Corrupted SOLIDWORKS Files
Chances are, if you’re reading this blog, you’re dealing with a possible corrupted SOLIDWORKS file and you’re wondering why this happened and what you can do to fix it.
First off, lets cover some of the reasons files get corrupted and how you can avoid these in the future.
While uncommon, a power outage or even power surge can cause all sorts of issues with all software and hardware. SOLIDWORKS is no exception, if you were in the middle of a save or file transfer, this can definitely cause problems. Look into a backup power supply device if you want to minimize damages from a power fluctuation.
Unexpected Application Termination
This could be related to a power surge, but also applies to unexpected crashes, or even a forced user termination of the application. Not all application hangs are the same, sometimes it pays to have patience. Tech Tip: You can always use the Windows Resource Monitor to see if SOLIDWORKS is still busy running a command or actually hanging.
This is the faulty hard-drive or memory fault. This one is hard to prepare for. One recommendation is to have backups of your files in case of hardware failure. If you suspect your hardware integrity is faulty or failing, refer to your local IT technician to determine whether new hardware is recommended or needed.
This is probably the most common cause of file corruption. This includes working over any remote network, server or cloud service. There are often too many variables to pinpoint the exact cause of corruption while saving over a network. These are most often remedied by your local Network Administrator. Our best advice is to work locally whenever possible. SOLIDWORKS PDM is another great solution as it automatically caches file locally.
This one may cover network issues as well. But more specifically, this can be related to a service that locks access or permissions to the file such as a OneDrive or DropBox. If you automatically sync your files, SOLIDWORKS may try to access the file at the same time Windows is accessing the file, locking it out from other applications. Again, our best advice is to work locally whenever possible.
So how can you tell if your file is corrupted and can you recover it?
I want to stress that not all corruptions are the same. You may get a different error depending on whether the file is recoverable or not.
The most common and generic error message you may receive is the following:
This does not provide a lot of information, however, there is still a chance some or all of the file is recoverable. I’ll cover some common troubleshooting techniques you can use if you get this error later in the blog.
Tech Tip: Check the file size of the corrupted file. A file size of 0KB means there is no information in the file and it is not recoverable.
You may also receive a message that the file can be repaired:
If you get either of these messages, SOLIDWORKS will attempt a repair of the file. Note that if you choose to recover geometry from your part, it will effectively become an imported part with no feature history.
Tech Tip: The ability for SOLIDWORKS to automatically repair a file is only available in 2017 and newer and the ability to recover geometry is only available in 2018 and newer versions.
And finally, the last message you may receive is:
Which means that there is little to no chance of recovery. When you receive this error, you should spend your time trying to find out how the file got corrupted and not if it’s recoverable.
So how do you know if your file is recoverable?
These are common techniques we use on tech support to determine if the information in the file is recoverable. Give these a try before calling support, however if you do contact us, we’d be happy to walk through these steps with you.
If you have a corrupt Drawing file, start with the referenced Part or Assembly files. Are you able to open each Part/Assembly individually? You may find the Drawing is only corrupt because of a corrupt Part/Assembly reference. If you find you do have a corrupt Part or Assembly, see Part Troubleshooting or Assembly Troubleshooting.
Tech Tip: You can also test for reference corruption by removing or renaming the Part/Assembly files from the data set. If the Drawing file opens with all empty views, you know there is reference corruption and not Drawing file corruption.
We can also narrow down corruption to individual sheets in a Drawing. A great test you can perform is to open your Drawing in Quick View and load sheets individually.
Tech Tip: You can find these Open options by going to File > Open inside SOLIDWORKS.
If the Drawing file opens in Quick View, you can then Right-Click each sheet individually and load them one by one. If SOLIDWORKS crashes when loading a specific sheet, you can see if the reference on that sheet is causing the issue or just delete that sheet from the Feature Tree and recreate it.
Just like with Drawings, Assembly files may report as corrupt because a specific reference in the Assembly is corrupt and not the entire Assembly. You can troubleshoot this by trying to open each Part or Subassembly file individually or removing the Part\Subassembly files completely.
We can also test this by just suppressing all the Part\Subassembly files in an Assembly, but if we can’t even open the Assembly, how can we suppress anything?
There is a unique open mode we can use to do just this. Go to File > Open inside SOLIDWORKS and select the Assembly file but do not hit open yet.
Under the Configuration drop-down, select <Advanced> then hit Open.
Select to create a new configuration showing assembly structure only. Give the new configuration a name such as “Test”. This will attempt to open the Assembly with a newly generated configuration with all Parts/Subassemblies suppressed.
You can then systematically unsuppress each Part or Subassembly until you find the reference that does not open.
Tech Tip: To speed up this process, you can also CTRL + Select or SHIFT + Select multiple Parts/Subassemblies and unsupress them in groups.
Once you identify the problematic file, you can either replace it, delete it or attempt to repair it.
The Part file is probably the hardest to troubleshoot for corruption, however, here are some steps you can take to see if the Part is recoverable.
First, take a look at the file size. If the file size reports 0KB, there is no information in the file to be recovered.
If the file does have information in it, check if the file is located on a network or cloud location. If it is, it is best to remove any network connectivity issues from the equation by copying the file locally and trying to open again.
If it still does not open locally, you can try another computer. It may be best to contact your VAR Technical Support and send the file in for further testing in another environment if no other computers are available to you.
At this point it may also be worth it to see if you have a previous save or backup file available. You may lose some work, but less than starting over.
As a last resort, we can escalate your file to SOLIDWORKS Technical Support to repair your Part file. However if you are considering this option, it’s important to understand that this process can take up to 3+ days and there is no guarantee SOLIDWORKS will be able to repair the file. In a lot of cases, it is faster to just recreate the file from scratch.
Computer Aided Technology, Inc