Large files after saving configuration as part.

User avatar
Hansjoerg
Posts: 113
Joined: Thu Apr 01, 2021 4:17 pm
Answers: 3
x 71
x 60

Large files after saving configuration as part.

Unread post by Hansjoerg »

Hello,
I create actual standard parts for Solidworkls (the ones in the Toolbox are too unperformant for me).
To create the standard parts, I make myself a master file with configuration controlled by Excel. With a macro I then save each configuration individually as a part out, delete the configuration table and a few more adjustments.
I always start from the same master part and make the next standard series with it, however, with each further standard series my generated parts become even larger.

I have already searched the net for different solutions and tried the following hints.
https://www.goengineer.com/blog/shrink- ... solidworks
https://grabcad.com/tutorials/tutorial- ... to-convert
But both tricks did not help.

Then I found a hint in the good old forum (Rip).
https://forum.solidworks.com/thread/5280

Unfortunately the macro is no longer available for download.
Maybe someone has the macro and can send it to me?
In the SWX Konwledge Base I can find the SPR but the macro is not there either.

I also attach one of the generated standard parts and the master file, maybe someone has a tip for me how I get the models slimmer.
Attachments
ISO-4017-8.8-A2k.SLDPRT
(1.23 MiB) Downloaded 53 times
ISO4017-M4x20-8.8-A2K.SLDPRT
(763.29 KiB) Downloaded 51 times
All the "good" news about SWX makes me feel like I'm driving a truck with two trailers straight into a dead end.
User avatar
DanPihlaja
Posts: 842
Joined: Thu Mar 11, 2021 9:33 am
Answers: 25
Location: Traverse City, MI
x 807
x 978

Re: Large files after saving configuration as part.

Unread post by DanPihlaja »

Save the part out as a Parasolid (x_t), and then import it back in. Parasolid is the native kernel of Solidworks, so you are literally stripping everything away except the geometry.

Try that and see what you get.
-Dan Pihlaja
Solidworks 2022 SP4

2 Corinthians 13:14
berg_lauritz
Posts: 423
Joined: Tue Mar 09, 2021 10:11 am
Answers: 6
x 439
x 233

Re: Large files after saving configuration as part.

Unread post by berg_lauritz »

Maybe this macro is helpful for you (it's not perfect by any means - but you can always "fix" the issues fairly quickly by yourself later on):


shameless plug

Shoutout to @JSculley who made this macro!
User avatar
Frederick_Law
Posts: 1945
Joined: Mon Mar 08, 2021 1:09 pm
Answers: 8
Location: Toronto
x 1635
x 1467

Re: Large files after saving configuration as part.

Unread post by Frederick_Law »

Try move EOF to the top and save.
User avatar
AlexLachance
Posts: 2179
Joined: Thu Mar 11, 2021 8:14 am
Answers: 17
Location: Quebec
x 2356
x 2011

Re: Large files after saving configuration as part.

Unread post by AlexLachance »

Hansjoerg wrote: Fri Nov 04, 2022 9:25 am Hello,
I create actual standard parts for Solidworkls (the ones in the Toolbox are too unperformant for me).
To create the standard parts, I make myself a master file with configuration controlled by Excel. With a macro I then save each configuration individually as a part out, delete the configuration table and a few more adjustments.
I always start from the same master part and make the next standard series with it, however, with each further standard series my generated parts become even larger.

I have already searched the net for different solutions and tried the following hints.
https://www.goengineer.com/blog/shrink- ... solidworks
https://grabcad.com/tutorials/tutorial- ... to-convert
But both tricks did not help.

Then I found a hint in the good old forum (Rip).
https://forum.solidworks.com/thread/5280

Unfortunately the macro is no longer available for download.
Maybe someone has the macro and can send it to me?
In the SWX Konwledge Base I can find the SPR but the macro is not there either.

I also attach one of the generated standard parts and the master file, maybe someone has a tip for me how I get the models slimmer.
I had noticed before that files would load themselves with some sort of cache and that doing a "Save as" would purge this cache when it happened. I've never really noticed it on a part though.
User avatar
Hansjoerg
Posts: 113
Joined: Thu Apr 01, 2021 4:17 pm
Answers: 3
x 71
x 60

Re: Large files after saving configuration as part.

Unread post by Hansjoerg »

@DanPihlaja
this is how I do it with all purchased parts that I import per step and still have to post-process. Unfortunately, I can't do that with the standard parts, because then I lose the mate reference.

@ berg_lauritz
Thanks for the hint, I will try the macro and see what happens.

@federick_Law
EOF? End of File? Can you explain this in more detail?

@all.
it's not a feature it's a bug:
I got the SPR Nr 507079 from support. When I search the Solidworks Knowledgebase for the number, I also get the SPR number 1085687. In the description of this SPR it says that the bug is fixed in version 2021 a1.... would be nice....
All the "good" news about SWX makes me feel like I'm driving a truck with two trailers straight into a dead end.
User avatar
bnemec
Posts: 1943
Joined: Tue Mar 09, 2021 9:22 am
Answers: 10
Location: Wisconsin USA
x 2542
x 1398

Re: Large files after saving configuration as part.

Unread post by bnemec »

This thread has had me thinking of a "thing" that IIRC is supposed to help with this, but I couldn't think of where I had seen it. I just stumbled upon it and wanted to share / check with you all if it applies to this.

If someone already mentioned this action here and it went over my head my apologies.
image.png
User avatar
JSculley
Posts: 643
Joined: Tue May 04, 2021 7:28 am
Answers: 55
x 9
x 876

Re: Large files after saving configuration as part.

Unread post by JSculley »

Ouch. If I create a new model with features built in the same way as your design table generated model, the file size is only 88kB. That's almost 9x smaller. Where in the world is the bloat coming from? I have a design table socket head cap screw model that I created in 1999 that has been used in nearly every assembly we have in the last 23 years. The file size is 1.6MB. If I save a copy and delete the design table and all configs except 1, the file size shrinks to 437kB. If I create a new model in the same way, the file size is 58kB. So about 7.5x smaller. So, it isn't just you. Clearly, something is being left behind in the file.

Next, I tried modifying the design table so that only one configuration was present. Saving this file reduced the size to 285kB. Better, but still about 5x larger than a model that never had a design table. I then added a new configuration manually, outside of the design table. Essentially a copy of the design table config. The file grew a little. Next, I deleted the design table. Size shrank to 193kB, so we're down to 3.3x. Finally, I deleted the single config that had been generated from the design table. Size is now 192kB, so not much difference.

Going back to my model that never had a design table, adding a config manually increases the size from 58 to 100kB. Delete the new config and the size shrinks, but only to 83kB. Repeat the process and the file goes up to 147kB and then drops to 125. So the file size is ever increasing each time a config is added.


There is are a couple SPRs mentioning this issue:

=======================
507079 --- The file size can not be returned to original file size after add configurations and design table then delete them.

1191481 - File size of small sample part increases dramatically after inserting Design Table, creating configurations and then remove all
==============================

Is there a reason why you save out each config separately? I use the single model file with DT controlled configurations and find it to be much more useful. If I want to change a screw size or length I just change the configuration. If I want to add a new screw, I just ctrl-drag an existing one and configure as needed. This also avoid the file size issue altogether. You only pay the file size penalty once, since every screw of the same type is from the same file, which only has to be loaded once. If you have 10 different screw files ( at 700kB each) in an assembly at vs 10 configurations of the single 1.23Mb file, you are loading 5x more data.

The single model requires a little more work to get the right info on BOMs and such but the pros outweigh the cons in my opinion.
Post Reply