We are having issues with SW2020 losing virtual components after shutting down or restarting our computers. We don't use any PDM program, we work over our local network and our project files are stored on our server. Has anyone else seen this happen or do you know what might be causing this?
Re: Losing virtual components?
Posted: Fri Jul 23, 2021 9:28 am
by mike miller
I avoid virtual components for this exact reason. With the loosy-goosy way that SWX finds components.....it seems like more trouble than it's worth.
That said, is there a consistent pattern that shows up?
Does it happen only to certain users or to everyone?
Are you always saving all files and closing SWX before shutting down your machine? Is your graphics card approved?
Re: Losing virtual components?
Posted: Fri Jul 23, 2021 10:12 am
by zwei
ellundo wrote: ↑Fri Jul 23, 2021 9:08 am
we work over our local network and our project files are stored on our server.
I think this is most probably the issue
The virtual component might not get saved properly through the network and somehow get corrupted
Did you directly work on the file on the network?
Re: Losing virtual components?
Posted: Fri Jul 23, 2021 10:42 am
by ellundo
The user here that complained about this has had it happen four times in the last few weeks. Less infrequently with a couple others. Always after a shutdown or restart.
He is using a certified graphics driver for his Nvidia quadro 4000 video card.
I don't have any understanding of where the data for virtual parts is stored.
Re: Losing virtual components?
Posted: Fri Jul 23, 2021 10:48 am
by ellundo
Zhen-Wei Tee wrote: ↑Fri Jul 23, 2021 10:12 am
I think this is most probably the issue
The virtual component might not get saved properly through the network and somehow get corrupted
Did you directly work on the file on the network?
Not sure the correct answer for this but I would say yes since the project is stored in a job folder on the server. Real or virtual, all our work is done over our network and saved to the server. No files are saved to our local drive.
Re: Losing virtual components?
Posted: Fri Jul 23, 2021 11:44 am
by Jim Steinmeyer
This is interesting, We too are using 2020 (someday we will all get to Win 10) and working over the network,saving on the server and I do not recall ever losing a virtual part.
Re: Losing virtual components?
Posted: Fri Jul 23, 2021 12:26 pm
by mattpeneguy
ellundo wrote: ↑Fri Jul 23, 2021 10:42 am
The user here that complained about this has had it happen four times in the last few weeks. Less infrequently with a couple others. Always after a shutdown or restart.
He is using a certified graphics driver for his Nvidia quadro 4000 video card. I don't have any understanding of where the data for virtual parts is stored.
Apparently neither does SW...
Re: Losing virtual components?
Posted: Fri Jul 23, 2021 12:56 pm
by bnemec
We are fairly new to SW in our office but Virtual Components are one of the few things we haven't had problems with.
yet.
The way VCs have been explained to me is that the virtual component only exists in the context of it's parent (real) file. All of the VCs files are embedded in the parent file, when SW opens the VC it unpacks those needed VCs to a temp directory and then works with them like normal files. The most important part is when the parent file is saved, those VCs are embedded into the parent file. When the parent file is closed the VC files in the temp directory are deleted. If SW crashes before the VCs are packed into the real file, you're hosed.
The temp location is as I understand:
C:\Users\{current user}\AppData\Local\Temp\swx{solidworks process id}\VC~~\{Parent assembly filename}
Edit: I have a couple users that manage to get in a state where the SW GUI is gone, but the process is still in Task Manager. I'm guessing that if the user was working on a file that had VCs open then those temp files will still be in that folder. Then the user starts up SW again and opens the parent file they were just working with I would hope that the new instance of SW uses the VCs in it's own temp folder and not files by the same name in the dying SW process's temp folder.
If the SW process is killed for whatever reason (my users like to do it about 1.5 seconds after the "Solidworks is Busy" dialog) the temp folder for that old process ID and the VC files all stay there, they are not deleted. The next time SW wants a file by that same file name I don't know what it will do. Maybe use the one in the temp directory for the dead SW PID or maybe the new one?
In this screen shot I show after I had two instances of SW (PID 28564 and 29532) that I killed while they had the same assembly open. If people have common parts as VCs I can imagine they will have a bunch of duplicate file names in these folders.
Re: Losing virtual components?
Posted: Fri Jul 23, 2021 1:40 pm
by mattpeneguy
bnemec wrote: ↑Fri Jul 23, 2021 12:56 pm
We are fairly new to SW in our office but Virtual Components are one of the few things we haven't had problems with.
yet.
The way VCs have been explained to me is that the virtual component only exists in the context of it's parent (real) file. All of the VCs files are embedded in the parent file, when SW opens the VC it unpacks those needed VCs to a temp directory and then works with them like normal files. The most important part is when the parent file is saved, those VCs are embedded into the parent file. When the parent file is closed the VC files in the temp directory are deleted. IfWhen SW crashes before the VCs are packed into the real file, you're hosed.
When I need to lose virtual components I found the quickest way is to utilize multiple assemblies. Converting an assembly to virtual that contains virtual components itself is a pretty sure bet. I am able to do it in 2018 without a restart using the technique below.
Re: Losing virtual components?
Posted: Wed Sep 08, 2021 7:57 am
by Hansjoerg
I also had the problem in SWX 2019 Sp3. After updating to SWX 2019 Sp5, it no longer occurred.
Re: Losing virtual components?
Posted: Tue Feb 14, 2023 2:44 am
by SolidKeke
SW2022 SP5.0 here.
If... I mean WHEN, Solidworks crashes, virtual component changes are lost EVEN if I had checked in the parent assembly. All the mates in the parent assembly are referring to those made changes and because of that they are all red and messed up. I started using SW 2020 and this bug has been around since then.
Re: Losing virtual components?
Posted: Tue Feb 14, 2023 9:03 am
by AlexLachance
ellundo wrote: ↑Fri Jul 23, 2021 10:42 am
The user here that complained about this has had it happen four times in the last few weeks. Less infrequently with a couple others. Always after a shutdown or restart.
He is using a certified graphics driver for his Nvidia quadro 4000 video card.
I don't have any understanding of where the data for virtual parts is stored.
Your collegue probably has a message checked to not show again which caused the files to not save and therefor throw the error.