10 Replies Latest reply on Jul 1, 2014 9:45 AM by Alex Ernsberger

    Fastest way to change many file references?

    Alex Ernsberger

      I need to change some 50 to 60 top-level parts (part means part or assembly in this case) which in reality means I probably have 150 individual part and assembly files. Then I have all the associated drawing files. All I need to do is change the filename for them which needs to match the part number. There are no actual changes. What solution would let me do this the fastest? Right now I'm doing it one by one. We have no PDM.

        • Re: Fastest way to change many file references?
          Alex Ernsberger

          I forgot to mention the way we name all our files is by PN. So when I change the PN I must change the part file name and that means it breaks all assembly and drawing references. That's why this is a massive headache.

            • Re: Fastest way to change many file references?
              Annette Jennings

              Change the file name in Windows Explorer first. Then when you re-open the SolidWorks file, the assembly will give you an error that it can't find "x" and will give you the option to browse for the correct file. As long as you've made no changes to the part model, all your assembly & drawing references will remain.

               

              I recommend only doing a handful at a time to avoid headaches - maybe start with one to see how it works and then increase as you get comfortable with how it works.

            • Re: Fastest way to change many file references?
              Brian Cliff

              Are you using Solidworks Explorer to rename your files? If not, the rename feature in Solidworks Explorer generally keeps the references, but you still have to rename them one at a time. I suppose someone could come up with a macro for renaming parts.

                • Re: Fastest way to change many file references?
                  Alex Ernsberger

                  We don't have Explorer setup on our network so I haven't been using it. If it can maintain references even to changed files that would be awesome though and I can look into it. Right now I'm using the previously suggested method since I have to open each one and make a minor drawing change anyway. I was just trying to avoid that because the automatic fixing on my system is sketchy sometimes ever since I upgraded to 2014.

                   

                  Exactly the issue I have is the following:

                   

                  Assembly right now is.... 1234 and consists of components 1234-1, 1234-2 and 1234-3. Some of them also have subassemblies so you get 1234-1 (subassembly) with 1234-1-1 and 1234-1-2. Now everything I have got revision bumped. No change but got revision bumped. So now 1234 is 1234A. So now we have 1234A-1 and so on. So I need to change all these names and then where the issue occurs is that I open drawing file or assembly file and it "can't find" the referenced components because they all changed names.

                   

                  Yes if SW-Explorer can handle that it would be a great help. Also if it could export part data and assembly data like part mass and other properties I would be insanely happy. Spent 2 hours the other day manually copying the weight of a bunch of crap into MS Excel.

                • Re: Fastest way to change many file references?
                  Mark Tafelski

                  We use the Solidworks rename command accessed via windows explorer.  If you right click on a file name and then access the Solidworks choice, you will see the rename option.  I believe this pulls up the same interface that you would see if you used Solidworks Explorer.  The default option is to update any files that have references to the renamed file (update where used) as long as they are in the same folder as the file being renamed.

                   

                  explorer-right-click-rename.pngrename-window2.png

                  Mark

                  • Re: Fastest way to change many file references?
                    Patrick O'Hern

                    Are you just renaming the files, or you are making copies of one set of files, and then renaming them?  If you are making copies first, then I would recommend using Pack & Go (found in the right click menu of Windows Explorer, or in SolidWorks Explorer).  You can use Select/Replace to quickly change the name of all of the new files.  It will also automatically relink all of the new files to the new file names (errors may still occur, but it will be much better than doing it manually).

                     

                    Even if you aren't making copies first, you may want to try doing Pack & Go to make copies, then just delete the originals.