3 Replies Latest reply on Oct 15, 2013 4:10 PM by Thomas Horst

    Bulk replace file references

    Thomas Horst

      Is there a way to replace all references to a file with a different file from PDM?


      After migrating our data to PDM just a windows file structure, we now can easily see that we had multiple copies of files with identical names in different folder locations. These were standard parts, and one of them (the real master part file) is used in several thousand places. The errant copies are still used in hundreds of scattered files. I want to replace all of the references to the extra parts with the master part so I can delete the extra parts and clean up the vault. With hundreds of assem.s referenceing the bad parts, it would take too long to do them one at a time.


      The "replace references" tool seems to be for relacing all the references in one specific assembly, not for replacing references in all assemblies to a specific part.





        • Re: Bulk replace file references
          Jeff Sweeney

          With the volume of files you are talking about, it may be worth while to write an application to update the references.


          If you really have only one file that you want to fix, you could add that file's directory to the list of Referenced Documents in the SW settings:


          Doing this will ensure SW will always open this master file even if the assembly is referencing the file from another location. Over time, as you checkin assemblies that would now reference the correct document, the problem will eventually fix itself.


          "Time heals all wounds"


          I'm not in love with this solution, but it is a very cheap and easy fix.

            • Re: Bulk replace file references
              Todd Barr



              We are having issues when migrating Assemblies from a network drive to the Vault, where the Assemblies once Checked In are still referencing files on the network drive. If the same referenced file exists in the Vault will placing the directory in Referenced Documents "force" the Assembly to reference the file in the Vault? Will it include sub-directories? What is the difference between this setting thru SolidWorks and the "External Reference" setting in the Vault as shown below? THANKS.XREF_Vault.png

              • Re: Bulk replace file references
                Thomas Horst

                I haven't messed with the referenced documents idea... though that seems problematic to implement on a system-wide basis. Could that be used at a directory level to, say, put all commonly referenced parts in one folder, and then point the referenced docs at that folder to force all  parts to use the standard parts in that directory?