Search Path Order
Opening Files in SOLIDWORKS
This article can also be found in our Blog
Created by: Darin Grosser, SW Elite Application Engineer
If you've used SOLIDWORKS for more than a week, you've most likely come across this message at least once...
Chances are you're seeing this message because you've either moved, renamed or even deleted a particular part file and you are trying to open the drawing or assembly 'looking' for said file. When SOLIDWORKS ultimately cannot locate the part, it finally throws this dialog.
Well... do you have any idea how hard SOLIDWORKS tried to find that file before it gave up??
Most, if not all, modern 3D CAD systems use some sort of file referencing. That simply means that assemblies and drawings depend on the existence of the part files for their definition. If the part doesn't exist, then neither can the assembly or drawing.
When you open an assembly or drawing in SOLIDWORKS, it 'looks' for the parts and/or assemblies used to define them, but "where" it looks is not always apparent.
Step by Step
Every time you open a file that is dependent on other files, SOLIDWORKS goes through a multi-step progression of paths to find a reference file. If it completes all the steps in the 'search' and still cannot locate the file, it will then have to depend on the user to manually locate the file.
The following steps are listed in Solutions ID S-026634 on the SOLIDWORKS Customer Portal, but I'll expand on each.
Every time an assembly or drawing is opened in SOLIDWORKS, it goes through the following steps in order to find and open dependencies:
1) RAM: If the file is already open in SOLIDWORKS' resident memory, it will use that file.
* This can be affected by naming conventions. If you are opening an assembly containing a file named "BLOCK.sldprt" and you already have a different file opened also named "BLOCK.sldprt", it will indicate that "the Internal ID's are different, would you like to use it?"
2) REFERENCE DOCUMENTS PATH: This path is defined at the SOLIDWORKS User Level in your System Options.
- Go to TOOLS > OPTIONS > General Tab > FILE LOCATIONS category.
- Select REFERENCE DOCUMENTS from the list.
* This one is SUPER COOL! If you set a path in the REFERENCE DOCUMENTS list, SOLIDWORKS will actually look here before looking at the original path or even in the same folder that the assembly or drawing are located in!
If you have a file management mess on your hands or are just trying to get yourself 'PDM Ready', you can gather all your "Standard Parts" into a folder, set the path to the "Standards" folder under Reference Documents and when you open your assemblies, they should pull the Standards from this location, instead of the dozens of 'copies' of standard parts you may have inadvertently created using 'Pack and Go' or 'Windows Data Management' techniques.
3) LAST PATH USED: When opening an assembly, it will look in the same location as this assembly for the parts and sub-assemblies.
This is why we can get files from other users and open them properly. Even though your drive letters and paths are different from everyone else, if you simply unzip all of the parts, assemblies and drawings you receive into a single folder, when SOLIDWORKS reaches Step 3 in the open process, it will find the parts the assembly is looking for.
4) LAST PATH USED BY THE SYSTEM: If SOLIDWORKS did not locate the parts in the same folder as the assembly, it will then look at the last path used by SOLIDWORKS to open a referenced file. SOLIDWORKS will skip this step in a fresh session where no other paths have been used.
5) LAST PATH (RELATIVE) WHEN PARENT DOCUMENT WAS SAVED: This is the path the part was located at the last time the assembly using that part was saved.
It is interesting to note that in this step, the path to the part is saved without the drive letter and is considered to be the "Current Drive". In other words, if you got a folder full of other folders and files that was on someone’s Z: drive and you put it on your F: drive, it would search the folders 'as if' you were on the original drive letter.
6) LAST PATH (ABSOLUTE) WHEN PARENT DOCUMENT WAS SAVED: This is the path the part was located at the last time the assembly using that part was saved.
This step now considers the actual drive letter in the path as it tries to locate the referenced files.
**In both Step 5 and 6, the path is stored within the assembly or drawing itself.
7) BROWSE: SOLIDWORKS now has exhausted what it can do without user input. You can now manually browse to the folder containing the part that could not be found.
This isn't necessarily a bad thing. There is a lot of good points to this step.
a) If you browse to part in a folder, it 'temporarily' adds that folder to the'Reference Documents' path so if SOLIDWORKS comes to another part it cannot find through the natural steps, it will also look in a previously successful folder for each subsequent part.
b) You can browse and point to 'the same file of a different name'. If SOLIDWORKS can't find the file because it was renamed in Windows Explorer, this is an opportunity to reconnect to the proper file.
Once the assembly or drawing open properly, hitting SAVE will update all the absolute paths to the parts and sub-assemblies inside the parent assembly or drawing.
If you are doing any kind of performance testing, it is imperative that the parent document gets properly opened and saved in its various locations to save the updated paths before any official OPEN or SAVE time testing is conducted.