SOLIDWORKS

How to fix Missing Files

How to fix Missing Files

Mar 16, 2023 | SolidWorks

If you have used SOLIDWORKS for any length of time you have certainly come across a scenario where you have tried to open an assembly or drawing and found yourself faced with a message saying that SOLIDWORKS is unable to find one or more files.

In this blog, we will look at why this message appears in the first place and how we can resolve this issue.

Why do you get this error?

The message “Unable to locate the file…” shown below appears when SOLIDWORKS is unable to find the exact file in the expected location.

To understand the logic behind this better, we need to understand two main concepts. How does SOLIDWORKS know the difference between files, and what file search logic does SOLIDWORKS use?

How SOLIDWORKS differentiates files

Most people may think that SOLIDWORKS just uses the File Name to know ‘which file is which’ but this is not the case, otherwise, you would never get an error message similar to the one below.

In this example, SOLIDWORKS has a file called “Pin_&.SLDPRT” already open (used in another assembly) and is now trying to open a new assembly which contains a part with the same name. However, rather than simply using this part, SOLIDWORKS knows that the two files are not the same, but merely that someone has created a duplicate file name.

This is because SOLIDWORKS assigns all files a unique “ID” which is what SOLIDWORKS uses for all references between files. This is not a value which is commonly known (or set) by the user, although users can obtain this ID value if required. This is how SOLIDWORKS was able to determine that the two Pins were not the exact same file.

In the above example, you would want to fully close any files with the same name and files which reference/use the file with the same name.

Both the file name and ID must match for SOLIDWORKS to open the file as expected.

Where does SOLIDWORKS search for files?

When opening a SOLIDWORKS file with references, SOLIDWORKS follows a set list of locations to look for the file in question before prompting the user to manually browse to the file (or suppress the file).

The search routine that SOLIDWORKS uses to find referenced files is:

  • Any files already open (loaded in memory)
  • Any folder added to your “Referenced Documents” File Location. Starting with those at the top
  • Any Sub-folders from the above location/s
  • The previously saved file location (last known referenced location)
  • If SOLIDWORKS is unable to find a file with the same file name and ID as expected, then the message asking you to browse for the file is shown.

Note - The paths for “Referenced Documents” are searched only if “Search file locations for external references” is selected in Tools > Options > System Options > External References.

Common causes and prevention

There are many reasons why SOLIDWORKS may not be able to find the correct file as discussed below.

Five of the most common reasons are listed below along with how to prevent each from being an issue:

1. When emailing files to another user a common mistake is only sending an assembly/drawing file and not the part files as well.

The best way to prevent this is to have your top-level assembly (or drawing) open and go to File > Pack and Go. This can gather all the required and referenced files together and put them either in a single folder, or zip them all together, allowing you to then just send someone the zipped which will give them all the files they need to open your model successfully.

Alternatively, you would need to send all the referenced files manually, which could be tricky if files are scattered over multiple folders.

2. A user has manually re-named a file in Windows Explorer.

When re-naming a file you should either re-name the file inside SOLIDWORKS with the file open or if re-naming in Windows Explorer you should right-click and use the SOLIDWORKS > Rename tool (image below), which will automatically update all references to the file.

If you are using a PDM vault and all files are inside PDM you can rename the file in Windows Explorer as normal (slow double-click or right-click > rename) as PDM will manage the files references being updated automatically.

3. A user has moved a file from one folder to another via drag and drop.

Like point 2 above, when moving a file in Windows Explorer you should use the right-click, SOLIDWORKS > Move (image below), option to perform this.

If using PDM you are free to drag a file from one PDM folder to another PDM folder without issues.

If using the 3DEXPERIENCE Platform, you can move files from one Collaborative Space to another or move files to a different bookmark while still maintaining the references.

4. A user has deleted the file.

Before deleting a file, the user should check if the file is being used/referenced by an assembly or drawing by checking its references.

If using PDM you can check this quickly by looking at the “where used” tab.

5. If you are migrating a lot of data (moving folders from 1 location to another) such as moving files into PDM for the first time you may need to move the project folders and Design Libraries separately.

In cases like this you would want to add the second (and subsequent) folder to your SW “Reference Location” so that the files can automatically be found when opening your projects rather than having to manually browse to the files.

    Resolving the issue

    There are several ways we can fix our files once we are in a situation where we need to re-link our file references.

    • When opening files and you are presented with the option to browse/suppress files you could click the option to manually browse to the files as required.
    • Before opening a file, you could click the “References” option at the bottom right of the Open window. This will bring up the “Edit Referenced File Locations” dialogue options where you can see all the files that SOLIDWORKS- would want to try to use and where from. You can double-click any of the file names and then browse to the new file you want to use. Any files you change will just affect this open operation (unless you hit the save button once open).
    • If you have your assembly open, you can use the “replace components” feature to swap out a component with another of your choice. This feature also gives you the ability to re-add any mates should the parts be slightly different in one way or another.

    Hopefully, after reading this blog you now understand why this message can appear as well as how to both prevent and fix this issue should you ever find yourself presented with an “unable to locate the file…” message.

    If you have any questions about this blog or SOLIDWORKS in general, please feel free to give us a call on 01324 550 760 or email us at SOLIDWORKS.Support@TMS-Scotland.com

    Related Articles

    How to Change a SOLIDWORKS Serial Number

    How to Change a SOLIDWORKS Serial Number

    There are various reasons why you may need to change your SOLIDWORKS serial number, for instance, if you need to: Switch to another SOLIDWORKS Standalone, Professional or Premium license. Change from a standalone license to a network-based license, or vice versa....

    PhotoView 360 Update

    PhotoView 360 Update

    SOLIDWORKS Visualize is our most advanced rendering product line, helping you streamline photo-quality content creation, including images, animations, interactive web content, and immersive Virtual Reality, by leveraging your 3D CAD data. SOLIDWORKS Visualize delivers...

    StormMeister Case Study

    StormMeister Case Study

    Watch our latest SOLIDWORKS Case Study and learn how TMS customer StormMeister® Flood Protection use SOLIDWORKS to help increase speed to market.