Understanding the SOLIDWORKS Search Routine Order

Problem

When working on a large assembly that many users have access to and edit, or when you send an assembly or drawing file to a colleague, there is a chance you can see the following warning: Unable to locate the file...

Unable_to_locate_the_file_error.png

This warning means that a part or sub-assembly being referenced by an overhead assembly or drawing file has been moved, renamed, or even deleted, and now SOLIDWORKS cannot find the file. Understanding the search routine that SOLIDWORKS performs to find files can help reduce the chance of replacing important files, or explain why your assembly opened up with a different project's parts. But what is the order SOLIDWORKS uses to find a part to help pinpoint where the reference broke? 

The search routine for SOLIDWORKS, done every time we open an assembly or drawing that references a part or sub-assembly, is as follows:

1. Search in Memory for a document
2. Search in specified File Locations that have been added in Tools/Options/File Locations
3. Search recursively near paths specified in step 2
4. Repeat step 2/3 for all designated File Locations
5. Search in the last known saved location

If all the above steps have been done and the file still cannot be found, we will be asked to browse to the file manually.

Search in memory

The first place SOLIDWORKS will look for a reference document is within the computer's memory, also known as RAM, which includes whatever files are open at the moment. This often causes problems if we have a part open with the same name as the one being referenced by an assembly or drawing. 

Example: If we open an assembly that references a file named DOOR.SLDPRT but currently we have a part with the same name opened, used for another assembly or project, then SOLIDWORKS will give us a message that states, “The internal IDs are different, would you like to use it?” We can then choose to replace the DOOR.SLDPRT being referenced with the file opened or continue to open the correctly referenced ones. 

Search in specified File Locations

The next place SOLIDWORKS will look for a file is in whatever folder that's listed as a reference folder in the System Options File Location section. To view the referenced document locations, go to Tools > Options > System Options > File Location. We can then click "Add" to browse to a folder and add it as a Referenced Document folder.

Navigate to referenced documents

Example: We open an assembly that references a part named DOOR.SLDPRT. If we happen to have a file named DOOR.SLDPRT, regardless of its intended assembly, it will use the DOOR.SLDPRT within the Referenced Document folder. SOLIDWORKS will also look into sub-folders of the referenced document for the parts as well, not just the folder specified in System Options. As a warning, we do not receive the Internal ID warning message if the referenced document has the incorrect part file; it will just open the assembly with whatever part is in there.

Search recursively near paths (last path used by the assembly or drawing)

This is where SOLIDWORKS usually starts to look for a part file being referenced. The assembly or drawing will look within whatever folder it currently resides in for the referenced parts. This is what the pack-and-go feature takes advantage of when sending files, as it places the assembly or drawing and all referenced parts into a single folder that is sent off. 

Example: We have an assembly and reference three part files, one named DOOR.SLDPRT, all in the same folder. If we remove the original DOOR.SLDPRT file from the folder and replace it with another part with the same name, it will reference the new one instead of the original that used to be in the same folder. All other referenced parts will remain the same.

Search in the last known saved location

If the referenced files are not within the same folder, SOLIDWORKS will search for the last location that the file resided in when the assembly or drawing was saved (on the same drive as the assembly or drawing).

Example: An assembly references the DOOR.SLDPRT file, which was last located in the folder path C:\swparts\project1 when the assembly was last saved. If we replace the DOOR.SLDPRT in the project1 folder with a part that has the same name, the assembly will open the new one instead of the original.

If it cannot find that file path on the same drive, it will look on other drives for that file path. Continuing from the previous example, if we happen to have a folder with the file path D:\swparts\project1, we can move the DOOR.SLDPRT into it, and the assembly can still find the file, as long as there is no DOOR.SLDPRT within the file path C:\swparts\project1. This is a handy trick to take advantage of when moving files from a local drive to a network.

Browse for Correct File

If SOLIDWORKS still cannot find the referenced file, we can browse to the file and select it. This will add that file location temporarily to the Referenced Documents directory in the System Options for future missing parts as well as during the current session. After browsing to the correct file, we can save the assembly so that SOLIDWORKS knows to look at that location in the future (the 5th search routine).

Example: The DOOR.SLDPRT that an assembly references was moved to a completely new location, along with other referenced files. We can browse to the location of these files, select the DOOR.SLDPRT, and SOLIDWORKS knows to now look at this folder for the files. 

Having to browse for the file also happens if the file was not renamed properly using SOLIDWORKS Utilities, even if it remains in the same folder as the assembly. 

Example: The DOOR.SLDPRT file was renamed (not moved) to DOOR_tall.SLDPRT. The next time we open an assembly that references the DOOR.SLDPRT file, it will ask us to browse to the file. We can select DOOR_tall.SLDPRT, save the assembly, and SOLIDWORKS will now know to find DOOR_tall.SLDPRT for that assembly.

For additional support, existing customers can submit a ticket or new customers can contact Hawk Ridge Systems.

Was this article helpful?
0 out of 0 found this helpful

Articles in this section

Comments

0 comments

Article is closed for comments.