Page 1 of 1
Macro to set Imagequality to coarse with Batch+
Posted: Thu Aug 19, 2021 6:14 am
by Eddy Alleman
I just published another macro on Codestack
- image.png (17.5 KiB) Viewed 2471 times
direct link :
https://www.codestack.net/solidworks-ap ... ty-coarse/
I hope you find it useful.
Please let me know if you have any comments/questions.
Eddy
Re: Macro to set Imagequality to coarse with Batch+
Posted: Thu Aug 26, 2021 11:54 am
by Eddy Alleman
Tip to speed things up :
if your files are all in the same folder, you can filter for *.SLDASM only, because of the setting, the parts in there will be affected too.
Re: Macro to set Imagequality to coarse with Batch+
Posted: Mon Apr 29, 2024 1:08 pm
by Slasher
Hello
@Eddy Alleman
Thanks for sharing this!
I want this settings to take effect permanently on all parts (meaning I want to also apply a save operation). Is this going to do that?
Here's the topic I started recently about this:
viewtopic.php?t=3403
Re: Macro to set Imagequality to coarse with Batch+
Posted: Mon Apr 29, 2024 1:15 pm
by AlexLachance
Slasher wrote: ↑Mon Apr 29, 2024 1:08 pm
Hello @Eddy Alleman
Thanks for sharing this!
I want this settings to take effect permanently on all parts (meaning I want to also apply a save operation). Is this going to do that?
Here's the topic I started recently about this:
viewtopic.php?t=3403
Using Batch+, I believe you would achieve what you desire since you should be able to add the 'save command' in the batch processing. I am permitting myself to answer as Eddy hasn't taken a peek at this forum in a little while. It is an option inside the program.
https://cadplus.xarial.com/batch/assembly/
Re: Macro to set Imagequality to coarse with Batch+
Posted: Mon Apr 29, 2024 1:21 pm
by Eddy Alleman
Hi Slasher,
thanks
@AlexLachance ;-) I'm back, but you are faster
you can use Batch+ for this see the complete article on Codestack:
https://www.codestack.net/solidworks-ap ... ty-coarse/
There is a button to save in the UI for every file you need to be saved:
- image.png (12.24 KiB) Viewed 2016 times
Try out the different button combinations and let us know how it went ;-)
Eddy
Re: Macro to set Imagequality to coarse with Batch+
Posted: Mon Apr 29, 2024 1:32 pm
by Slasher
Amazing!
Thank you Eddy for putting this together; I didn't realize it has auto-save capability! Let me give it a try.
Re: Macro to set Imagequality to coarse with Batch+
Posted: Tue Apr 30, 2024 1:49 pm
by Slasher
Hi
@Eddy Alleman
I installed batch+ and it worked fantastically; thank you! I like how versatile it is; it's much more than just a batch processing software. It even provides a log so you know which files the macro couldn't work on.
I hate to ask this since you already helped me tremendously; but is there a way to modify below macro so that it change to slightly higher tessellation? Right now it's a bit too coarse for my application. Let's say in the image below; if you divide the slider by 5; then somewhere around first one (%20).
https://www.codestack.net/solidworks-ap ... ty-coarse/
Re: Macro to set Imagequality to coarse with Batch+
Posted: Tue Apr 30, 2024 2:04 pm
by SPerman
Find this line:
'**********************
boolstatus = swModel.Extension.SetUserPreferenceInteger(swUserPreferenceIntegerValue_e.swImageQualityShaded, _
swUserPreferenceOption_e.swDetailingNoOptionSpecified, _
swImageQualityShaded_e.swShadedImageQualityCoarse)
The bottom line is what you care about. You have 3 choices for "swImageQualityShaded_e"
swShadedImageQualityCoarse
swShadedImageQualityFine
swShadedImageQualityCustom
The "Custom" option requires other coding to set the custom value. You could try "Fine" and see how that works for you. That option works the same as "Coarse"
Re: Macro to set Imagequality to coarse with Batch+
Posted: Tue Apr 30, 2024 2:42 pm
by Slasher
@SPerman
This forum is amazing.
I edited the macro and replaced Coarse with Fine and it ended up around where I wanted; it's perfect now, thank you Sperman!