1 Reply Latest reply on May 30, 2017 12:07 PM by Devin Wyatt

    repairing a lot of broken references

    Gordon Rigg

      On this thread is discussed a method of extracting data from Workgroup PDM. Workgroup PDM to PDM Standard Migration

      Now I have all my data reproduced in a windows file structure. (thank you Devin Wyatt)

      All the files have unique names because they were in workgroup pdm.


      Unfortunately the assembly references are all broken, except where the referenced files were in the same project (and now the same directory). The inter project references are all broken. Its very depressing.

      If I put this data in worlgroup pdm in this state, the references dont fix themselves. in fact there seems to be no way to repair the references in PDM standard, even though the filenames are all unique. Unless somepone knows how to make it search for unfound fales in directory x and all its sub directories.


      Now if I was importing genuine windows file system data, those inter directory references would be working, and they would be reproduced in PDM standard. ire its a problem only for those who are trying to self extract their data from WPDM. If you are going from wondows file system to PDM standard you should be fine.


      So far the only way I have figured out, is to long hand list every directory and sub directory in the file locations, Referenced documents section. Its a lot of directories.

      I managed to extract the directory structure into a text file, but now I'm faced with pasting that line by line... unless someone knows better?


      So my question:

      Is there a way to get solidworks to look for files in D:\mydata\"every directory and sub directory here" it seems very sad that there isn't a tick box, include sub directories!

      or is there a way to paste a gigantic list of file locations  into the Referenced documents window?



      I need a macro to open every assembly and drawing (but not parts) in a directory and all its levels of sub directories, rebuild, save, close.


      Then all the assemblies should have good references.


        • Re: repairing a lot of broken references
          Devin Wyatt

          Hi Gordon,


          I just replied to your email (literally seconds before I got this notification about this topic). The key is using the Update References tool before checking in the assemblies for the first time. For anyone else reading this, below is my quick summary of how to do this. Just remember that you have to do this BEFORE checking in the assemblies for the first time otherwise it breaks all the references and you can't use the tool once that has happened.


          1. From PDM vault view in windows explorer, select an assembly and then go to Tools > Update References…
          2. From here you just select all the files (Ctrl-A works). The tool will let you specify only to actually replace files that are missing so selecting all the files saves having to select only the missing files and trust me, once you have been doing this process for several hours you will want to save clicks and time everywhere you can.
          3. Then click the “Find Files” button (folder with magnifying glass).
          4. From here you can select where to search – I just used the top level vault item but you could restrict the search to a particular folder if you knew all the missing items were there. In practice I just did top level because then it was the same every time and I didn’t have to worry about missing anything. Note at the bottom of this dialog that you can choose to search sub-folders (this is important) and also only search for files listed with warnings (also important if you selected everything like I suggested).
          5. Click Next and it should search and display the results and hopefully it found all the missing items.
          6. Then click Finish and it will take you back to the original Update References dialog where you will see the things to be changed listed in the Warnings column (it should say “OK (Modified)” beside each item it found and replaced, and the assembly item should say “local file is modified”).
          7. Click Update and it should close the dialog and you’re done.