Page 1 of 1
Cannot save mirrored sheet metal parts, says they are corrupt then SW crashes on file close.
Posted: Tue Oct 26, 2021 10:41 am
by bnemec
reproducable problem of create new sheet metal model, save it. Then mirror it but when trying to save, after the "Save file dialog" the error comes up stating file is corrupt and cannot be saved. Then I close the mirrored file by clicking X box in upper right corner which crashes SW with an error log, supposedly sent to SW. I've tried making several new files and mirroring them, same behavior. Files in or out of the vault, doesn't matter.
- When it fails to save I can see a 0kB file in the vault folder as a local file (not added to vault).
- I'm trying to be methodical in recreating changing one variable (template or gauge table, etc.) and test each method a couple times. I'm not getting 100% consistency, when I try to do the same process exactly the same to confirm behavior but get different result it makes me a bit insane.
Sometimes problems are a one off psudo-random behavior from thousands of factors; those problems are waste of my time to troubleshoot. Usually "restart" or "delete the file and redo or start over" are the least costly solution. Other problems are experienced by >80% of the userbase and fresh in our minds when someone mentions a symptom.
I'm asking this to see if this is a normal problem with a paved workaround. I tried searching the KB and found a couple SPRs.
1157105: reported as solved in 2020 SP2 and is due to equation(s) failing because of deleted/invalid dimensions.
1205304: open and just says "'Document...is corrupt and cannot be saved' warning shown when saving SOLIDWORKS file with inserted part." I'm assuming that mirroring a part is a type of inserted part? so this could apply but there's no other data in the SPR.
Anyone else run into similar sounding issue?
Re: Cannot save mirrored sheet metal parts, says they are corrupt then SW crashes on file close.
Posted: Tue Oct 26, 2021 5:11 pm
by bnemec
I'm not 100% sure but it's something to do with adding "Thickness" custom property and checking the transfer option to "Unlocked properties".
If that option is checked and Thickness in the custom properties the mirrored file is corrupt and usually crashes Solidworks on close. My testing wasn't 100% consistent so there must be something I changed and didn't notice. I'm tired of messing with it, I found a way to be able to mirror the model I started with, uncheck that setting when mirroring.
I don't know what all is going on behind the scenes but I'm guessing this is related to SRP 1205304 because it cannot evaluate "
Thickness@Part6.SLDPRT"
Re: Cannot save mirrored sheet metal parts, says they are corrupt then SW crashes on file close.
Posted: Tue Oct 26, 2021 5:31 pm
by mike miller
Are you using a gauge table? We found that derived parts consistently demonstrate unintended non-functionality when a gauge table is used.
Re: Cannot save mirrored sheet metal parts, says they are corrupt then SW crashes on file close.
Posted: Tue Oct 26, 2021 5:33 pm
by bnemec
mike miller wrote: ↑Tue Oct 26, 2021 5:31 pm
Are you using a gauge table? We found that derived parts consistently demonstrate
unintended non-functionality when a gauge table is used.
Are you kidding me?!? Of course, we're using a gauge table. It's not like someone laid out a map of the minefield for us before we started trying to remodel our entire parts base in SW.
Re: Cannot save mirrored sheet metal parts, says they are corrupt then SW crashes on file close.
Posted: Wed Oct 27, 2021 7:53 am
by mike miller
bnemec wrote: ↑Tue Oct 26, 2021 5:33 pm
Are you kidding me?!? Of course, we're using a gauge table. It's not like someone laid out a map of the minefield for us before we started trying to remodel our entire parts base in SW.
Unfortunately, I'm not kidding.
A mirrored copy of a part is an inserted part (Solid Edge handles it the same way, except they call it Insert Part Copy). The problem we ran into was exactly what you described; any time a part with a gauge table is inserted into another part you'll get errors. This rears its ugly head for mirrored parts as well as the workflows using the Insert Part/Delete Bodies or the Save Bodies methods of breaking up a master model.
The solution we discovered was to uncheck Sheet metal information when inserting a part into a part or mirroring in an assembly context. This creates a derived part without any sheet metal features. Next convert the derived part to sheet metal and manually key in the sheet metal parameters. You cannot use a gauge table on derived parts. Full stop. This drove me straight up the wall until I submitted to the software.
One possible workaround would be to push sheet metal properties into custom properties via equations, then reversing the process for the derived part.
Re: Cannot save mirrored sheet metal parts, says they are corrupt then SW crashes on file close.
Posted: Wed Oct 27, 2021 9:26 am
by jcapriotti
bnemec wrote: ↑Tue Oct 26, 2021 5:11 pm
I'm not 100% sure but it's something to do with adding "Thickness" custom property and checking the transfer option to "Unlocked properties".
If that option is checked and Thickness in the custom properties the mirrored file is corrupt and usually crashes Solidworks on close. My testing wasn't 100% consistent so there must be something I changed and didn't notice. I'm tired of messing with it, I found a way to be able to mirror the model I started with, uncheck that setting when mirroring.
I don't know what all is going on behind the scenes but I'm guessing this is related to SRP 1205304 because it cannot evaluate "
Thickness@Part6.SLDPRT"
image.png
I couldn't reproduce it in 2020. I do get this message when editing the mirror part feature and closing it out. Maybe you can attach the offending file?
Re: Cannot save mirrored sheet metal parts, says they are corrupt then SW crashes on file close.
Posted: Wed Oct 27, 2021 9:54 am
by bnemec
mike miller wrote: ↑Wed Oct 27, 2021 7:53 am
Unfortunately, I'm not kidding.
A mirrored copy of a part is an inserted part (Solid Edge handles it the same way, except they call it Insert Part Copy). The problem we ran into was exactly what you described; any time a part with a gauge table is inserted into another part you'll get errors. This rears its ugly head for mirrored parts as well as the workflows using the Insert Part/Delete Bodies or the Save Bodies methods of breaking up a master model.
The solution we discovered was to uncheck Sheet metal information when inserting a part into a part or mirroring in an assembly context. This creates a derived part without any sheet metal features. Next convert the derived part to sheet metal and manually key in the sheet metal parameters. You cannot use a gauge table on derived parts. Full stop. This drove me straight up the wall until I submitted to the software.
One possible workaround would be to push sheet metal properties into custom properties via equations, then reversing the process for the derived part.
I don't know what to say to this. People are actually using this software for sheet metal parts? Solidworks is about 15 years behind Solid Edge in sheet metal function.
Re: Cannot save mirrored sheet metal parts, says they are corrupt then SW crashes on file close.
Posted: Wed Oct 27, 2021 10:04 am
by bnemec
jcapriotti wrote: ↑Wed Oct 27, 2021 9:26 am
I couldn't reproduce it in 2020. I do get this message when editing the mirror part feature and closing it out. Maybe you can attach the offending file?
image.png
The wording of that warning makes me think that SW embeds a copy of the gauge table into the part when the gauge table is selected for the first sheet metal feature. I hope I'm wrong or that there's a way to update the embedded table if ever needed.
I can attach one; I made a half dozen test parts trying to figure out what was going on. Solidworks does make a file on disk when it fails to save the mirrored part; it is empty file and doesn't get added to vault.
Re: Cannot save mirrored sheet metal parts, says they are corrupt then SW crashes on file close.
Posted: Wed Oct 27, 2021 10:42 am
by jcapriotti
@bnemec No crash in 2020sp5. Do you have the version to test? Of course when it inserted the bend table in the mirror it used the default bend table since I don't have yours. Not sure if that's a factor.
A copy of the bend table is embedded but I don't see how it affects anything in the mirror. Even if I override and change the k-factor the flat doesn't change.
Re: Cannot save mirrored sheet metal parts, says they are corrupt then SW crashes on file close.
Posted: Wed Oct 27, 2021 11:37 am
by bnemec
jcapriotti wrote: ↑Wed Oct 27, 2021 10:42 am
@bnemec No crash in 2020sp5. Do you have the version to test? Of course when it inserted the bend table in the mirror it used the default bend table since I don't have yours. Not sure if that's a factor.
A copy of the bend table is embedded but I don't see how it affects anything in the mirror. Even if I override and change the k-factor the flat doesn't change.
sorry to ask the obvious, but you're saying when you make a mirrored part from one that I attached with those options selected from my earlier post the new file would save just fine?
Does the new file use the gauge table from parent part or yours?
Also, could be what variables are used in our custom properties in the part template.
I do not have a new version of SW, multiple installations is a portion of the minefield I have not yet explored.
Re: Cannot save mirrored sheet metal parts, says they are corrupt then SW crashes on file close.
Posted: Wed Oct 27, 2021 12:08 pm
by jcapriotti
bnemec wrote: ↑Wed Oct 27, 2021 11:37 am
sorry to ask the obvious, but you're saying when you make a mirrored part from one that I attached with those options selected from my earlier post the new file would save just fine?
Does the new file use the gauge table from parent part or yours?
Also, could be what variables are used in our custom properties in the part template.
I do not have a new version of SW, multiple installations is a portion of the minefield I have not yet explored.
Yes, it saved fine and I can reopen it.
It shows your gauge table in the description, I thought it was the default but I'm not sure. After creating the mirror part, excel opens for a second and I can see the gauge table but I don't for sure if its yours.
Here's the gauge table popup:
Re: Cannot save mirrored sheet metal parts, says they are corrupt then SW crashes on file close.
Posted: Wed Oct 27, 2021 12:40 pm
by bnemec
jcapriotti wrote: ↑Wed Oct 27, 2021 12:08 pm
Yes, it saved fine and I can reopen it.
It shows your gauge table in the description, I thought it was the default but I'm not sure. After creating the mirror part, excel opens for a second and I can see the gauge table but I don't for sure if its yours.
image.png
Here's the gauge table popup:
image.png
image.png
That is ours. I have never seen excel open, even for just a second, when mirroring or setting sheet metal options to a gauge table.
Based on your feedback I'm going to try to get newer version of SW installed so I can see if this turd in the bath water is here to stay or be cleared out eventually.
Re: Cannot save mirrored sheet metal parts, says they are corrupt then SW crashes on file close.
Posted: Tue Nov 09, 2021 9:37 am
by bnemec
jcapriotti wrote: ↑Wed Oct 27, 2021 10:42 am
@bnemec No crash in 2020sp5. Do you have the version to test? Of course when it inserted the bend table in the mirror it used the default bend table since I don't have yours. Not sure if that's a factor.
A copy of the bend table is embedded but I don't see how it affects anything in the mirror. Even if I override and change the k-factor the flat doesn't change.
Marked the thread as solved, this problem appears to be fixed somewhere between 2019 SP4 and 2020 SP5. It feels like the gauge table is copied from the part being mirrored and something about that conflicts with the gauge table or some custom property in the new file. Unchecking the "Unlocked Properties" option unchecked seems to help in 2019 SP4 as well.