Evening!
So we are all familiar with the troubled mechanism of working with the image quality (aka model detail) setting in SolidWorks and how you often need to set it manually for each part & assembly in a large model, specifically, legacy stuff created without proper templates.
Now the macros for the single file adjustment is pretty simple, as far as I understand, and it does work on a single manual run no problems:
Dim swApp As SldWorks.SldWorks
Dim instance As SldWorks.ModelDoc2
Dim QualityNum As Integer
Sub main()
Set swApp = Application.SldWorks
Set instance = swApp.ActiveDoc
QualityNum = 5
instance.SetTessellationQuality QualityNum
End Sub
I've found and tried multiple macros templates to apply this to every file in a folder or every component in assembly but none seemed to work properly. Could someone please help me out here? Also it would be great to set the wireframe quality at lowest.
The closest to a solution I've found here was this thread, but it didn't seem to change the components' settings.
Thank you in advance!
Please see the following macro example to loop through all PART in a specific folder
You will need to change the path (highlighted in red, and dont forget to make sure it is end with \)
[Edit]
The macro will/should open and save all part, but not the asm, to make it work for all asm you might want to add the following do...loop after the first loop