Setting Image Quality For All Parts in an Assembly
Setting Image Quality For All Parts in an Assembly
Hello all;
I have a large assembly and I want to set image quality of all its components to an exact value in settings. There are macros out there to achieve that.
My question: Do I have to check-out all the components (i.e. have write-access) before running such a macro in order for this to take effect permanently? Are there better workarounds for this?
Thank you;
I have a large assembly and I want to set image quality of all its components to an exact value in settings. There are macros out there to achieve that.
My question: Do I have to check-out all the components (i.e. have write-access) before running such a macro in order for this to take effect permanently? Are there better workarounds for this?
Thank you;
Re: Setting Image Quality For All Parts in an Assembly
Yes you need to have write access to the files as you will be changing and then saving the files.
Deepak Gupta
SOLIDWORKS Consultant/Blogger
SOLIDWORKS Consultant/Blogger
Re: Setting Image Quality For All Parts in an Assembly
we face a similar issue with our vault. image quality is a per document property, so you have to save it with the file. you could have it temporary set without saving if the file is fully loaded (i.e. has its own window open inside solidworks), but you can do it for a limited amount of data (less than 50 files iirc ) as solidwotks will go out of memory.
this is one of the reasons to set a conpany standard (e.g. same image quality when adding a new catalog part to the vault)
this is one of the reasons to set a conpany standard (e.g. same image quality when adding a new catalog part to the vault)
Re: Setting Image Quality For All Parts in an Assembly
@mp3-250
Thanks; that makes sense.
When you say setting company standard; is that something that the user still has to apply the settings say when you download a new catalog part?
I think for neutral file formats this would work great since SW just grabs the default template you set so I assume it loads it with proper image quality settings. But if it's a Native SW files (some of our catalog files are Native; SMC cylinders or McMaster native SW file) that needs to be set after opening the files since the template is whatever the vendor saved the files with? Correct?
Thanks; that makes sense.
When you say setting company standard; is that something that the user still has to apply the settings say when you download a new catalog part?
I think for neutral file formats this would work great since SW just grabs the default template you set so I assume it loads it with proper image quality settings. But if it's a Native SW files (some of our catalog files are Native; SMC cylinders or McMaster native SW file) that needs to be set after opening the files since the template is whatever the vendor saved the files with? Correct?
Re: Setting Image Quality For All Parts in an Assembly
@gupta9665
Thank you.
Follow up question:
What would be your workflow then say if you have an assembly of 500 parts in PDM and you know there are some parts that have high image quality settings.
You would do a complete check-out on the root assembly then run the macro?
Thank you.
Follow up question:
What would be your workflow then say if you have an assembly of 500 parts in PDM and you know there are some parts that have high image quality settings.
You would do a complete check-out on the root assembly then run the macro?
- AlexLachance
- Posts: 2180
- Joined: Thu Mar 11, 2021 8:14 am
- Location: Quebec
- x 2362
- x 2012
Re: Setting Image Quality For All Parts in an Assembly
I believe catalog parts from 3DContentCentral or McMaster or whichever place they come from will not use your template to generate themselves, so you will need to toggle these manually upon creation. So your assumption would be correct.Slasher wrote: ↑Mon Apr 29, 2024 10:01 am When you stay setting company standard; is that something that the user still has to apply the settings say when you download a new catalog part?
I think for neutral file formats this would work great since SW just grabs the default template you set so I assume it loads it with proper image quality settings. But if it's a Native SW files (some of our catalog files are Native; SMC cylinders or McMaster native SW file) that needs to be set after opening the files since the template is whatever the vendor saved the files with? Correct?
You could do a complete check-out on the whole assembly and then use this setting to apply the setting everywhere: (Apply to all referenced part documents)
https://help.solidworks.com/2021/Englis ... isplay.htm
Re: Setting Image Quality For All Parts in an Assembly
@AlexLachance
Thank you!
The only issue I have with "Apply to all referenced part documents" is this:
Let's say I open my root assembly. I then set image quality to 20% & check the "Apply to all referenced part documents" and it successfully applies that settings to all the parts; okay perfect. I also have all the parts checked-out. At this point I perform a save operation.
However if I close the root assembly & open a sub-assembly or a component belonging to the root assembly then it opens with the settings it was last saved as (meaning the 20% only takes effect on these parts when I open the root assembly).
So in order to have all the components at 20% permanently I need to apply that settings at root level; but then open everything and do a save operation.
So I guess now my question is: Is there a way to force save operation on all the part in an assembly without directly opening them? I heard of batch operations macro that go through a series of files one by one; maybe that's the only option?
Thank you!
The only issue I have with "Apply to all referenced part documents" is this:
Let's say I open my root assembly. I then set image quality to 20% & check the "Apply to all referenced part documents" and it successfully applies that settings to all the parts; okay perfect. I also have all the parts checked-out. At this point I perform a save operation.
However if I close the root assembly & open a sub-assembly or a component belonging to the root assembly then it opens with the settings it was last saved as (meaning the 20% only takes effect on these parts when I open the root assembly).
So in order to have all the components at 20% permanently I need to apply that settings at root level; but then open everything and do a save operation.
So I guess now my question is: Is there a way to force save operation on all the part in an assembly without directly opening them? I heard of batch operations macro that go through a series of files one by one; maybe that's the only option?
- AlexLachance
- Posts: 2180
- Joined: Thu Mar 11, 2021 8:14 am
- Location: Quebec
- x 2362
- x 2012
Re: Setting Image Quality For All Parts in an Assembly
I personally did all our parts/assemblies individually with #TASK when it was available. I thought that setting I showed you applied to all parts as it is a setting that is used in some macros to toggle quality everywhere but it seems I was mistaken, my apologies.Slasher wrote: ↑Mon Apr 29, 2024 11:03 am @AlexLachance
Thank you!
The only issue I have with "Apply to all referenced part documents" is this:
Let's say I open my root assembly. I then set image quality to 20% & check the "Apply to all referenced part documents" and it successfully applies that settings to all the parts; okay perfect. I also have all the parts checked-out. At this point I perform a save operation.
However if I close the root assembly & open a sub-assembly or a component belonging to the root assembly then it opens with the settings it was last saved as (meaning the 20% only takes effect on these parts when I open the root assembly).
So in order to have all the components at 20% permanently I need to apply that settings at root level; but then open everything and do a save operation.
So I guess now my question is: Is there a way to force save operation on all the part in an assembly without directly opening them? I heard of batch operations macro that go through a series of files one by one; maybe that's the only option?
Re: Setting Image Quality For All Parts in an Assembly
No worries! Technically you were correct that it applies to all parts. The limitation is that there's not an easy way to permanently (i.e. save) apply that settings to all referenced components.
Though describing it as a limitation may not be correct; since as @mp3-250 said if there was such an option it would probably cause havoc as it means asking Solidworks to perform save operation on thousands of parts and that will just cause crashing?!
I guess conclusion is I need to find a batch processor that can run this macro one-by-one or see if Task Scheduler has an option for this.
Though describing it as a limitation may not be correct; since as @mp3-250 said if there was such an option it would probably cause havoc as it means asking Solidworks to perform save operation on thousands of parts and that will just cause crashing?!
I guess conclusion is I need to find a batch processor that can run this macro one-by-one or see if Task Scheduler has an option for this.
Re: Setting Image Quality For All Parts in an Assembly
I also recommend #TASK, even though it is no longer free.
-
I may not have gone where I intended to go, but I think I have ended up where I needed to be. -Douglas Adams
I may not have gone where I intended to go, but I think I have ended up where I needed to be. -Douglas Adams
Re: Setting Image Quality For All Parts in an Assembly
I am developing a pdm task to update our hardware.
there is an example in the KB with a general task (i.e. different from the usual print and conversion) and you could modify it.
For my purpose I will lauch a task that:
・open a part file (ignore assy)
・cache locally the latest version
・checkout
・set the document properties (image quality etc)
・cycle through configurations and force rebuild them
・save
・checkin overwriting the latest version and deleting the locally cached version
in this way you can launch the task from the pdm explorer interface, using the search, the bom tab etc, selecting the files and launching the task from there.
I skip the assemblies as the correct rebuildng order is bottom up and I want the parts to be updated before their parents. So the process must be repeated for each sub assembly manually.
there is an example in the KB with a general task (i.e. different from the usual print and conversion) and you could modify it.
For my purpose I will lauch a task that:
・open a part file (ignore assy)
・cache locally the latest version
・checkout
・set the document properties (image quality etc)
・cycle through configurations and force rebuild them
・save
・checkin overwriting the latest version and deleting the locally cached version
in this way you can launch the task from the pdm explorer interface, using the search, the bom tab etc, selecting the files and launching the task from there.
I skip the assemblies as the correct rebuildng order is bottom up and I want the parts to be updated before their parents. So the process must be repeated for each sub assembly manually.
Re: Setting Image Quality For All Parts in an Assembly
I wanted to add an update to this post:
I found a good solution in another topic; here's the link (essentially using a batch processor; in this case Batch+)
viewtopic.php?p=35105#p35105
Here was the workflow:
checked-out parts from root assembly
downloaded this macro https://www.codestack.net/solidworks-ap ... ty-coarse/
downloaded and installed batch+ (I am using community version which is limited functionality but has what I need)
added the downloaded macro to batch+
added my assembly file to batch+ and instructed the software to run it on all its reference files as well
video on specific steps can be found here (using a different macro):
Thanks all of the help.
I found a good solution in another topic; here's the link (essentially using a batch processor; in this case Batch+)
viewtopic.php?p=35105#p35105
Here was the workflow:
checked-out parts from root assembly
downloaded this macro https://www.codestack.net/solidworks-ap ... ty-coarse/
downloaded and installed batch+ (I am using community version which is limited functionality but has what I need)
added the downloaded macro to batch+
added my assembly file to batch+ and instructed the software to run it on all its reference files as well
video on specific steps can be found here (using a different macro):
Thanks all of the help.
Re: Setting Image Quality For All Parts in an Assembly
Can you please elaborate on:mp3-250 wrote: ↑Mon Apr 29, 2024 9:19 pm I am developing a pdm task to update our hardware.
there is an example in the KB with a general task (i.e. different from the usual print and conversion) and you could modify it.
For my purpose I will lauch a task that:
・open a part file (ignore assy)
・cache locally the latest version
・checkout
・set the document properties (image quality etc)
・cycle through configurations and force rebuild them
・save
・checkin overwriting the latest version and deleting the locally cached version
in this way you can launch the task from the pdm explorer interface, using the search, the bom tab etc, selecting the files and launching the task from there.
I skip the assemblies as the correct rebuildng order is bottom up and I want the parts to be updated before their parents. So the process must be repeated for each sub assembly manually.
cache locally the latest version & deleting the locally cached version? These won't happen at check out and check in automatically? How do you do these operations?
Re: Setting Image Quality For All Parts in an Assembly
It is an automated TASK, so we have to cover a lot of scenarios and avoid assumptions.
IF the workstation has not yet cached the file then it retrieves the latest version, but if the workstation already cached the file at some point, the latest version is not automatically retrieved and the past version is opened. (at least if you do not force the use of latest version in your vault)
Deletion from the local cache is not automatic otherwise tbe network traffic would be like a file server with all the data retrieved in real time and not on user demand: we had a user that after years got 30GB of data cached locally and those were old jobs that were not needed anymore.
Under explorer tools menu (iirc I am not in front of my pdm client, I am in vacation right now it could be the Edit menu)you can clean the selected folder local cache otherwise it stays there... forever. Probably the deletiom could be set to happen automatically, but it is not a standard PDM setup afaik.
for this reason since the TASK PC is going to update a big part of our vault I want to be sure that after the operation the local cache is restored to its clean state otherwise GBs of data will be cached there.