27 Replies Latest reply on Dec 20, 2013 8:20 AM by Jacob Johnson

    Copied files still reference old location

    Charles Culp

      A coworker of mine copied files from one location (our released documents folder) to another (his local working directory). He copied three files (copy and paste in windows explorer), an assembly and two part files. They were all in the same directory on the server, and he copied them to the same directory on the local drive.

       

      When he opened up the assembly locally, it still opened the part files off of the server. So then when he modified the parts/assembly, it modified the released document (which wasn't write protected).

       

      Now, we already discussed using Pack & Go. What I am concerned with exclusively, is that this is not the functionality as expected. I remember hearing that SW2013 has different file reference lookups, but I could not find information on that anywhere. All the users here are expecting for SolidWorks to look in the local directory for the assembly first, is this no longer the case, and where can I find the information showing this?

        • Re: Copied files still reference old location
          Paul Marsman

          Charles,

            I have not heard of changes to the references search order.  That would be something to know!!

           

            Have you been able to reproduce this (obviously without changing released files again)?  I'm going to try later on our network.

           

          Paul

            • Re: Copied files still reference old location
              Paul Marsman

              I made an Assembly with 2 parts (one part in a subfolder) on our server.  Copied it to my desktop.  Opened the assembly and "Find References" lists everything coming from my desktop.  FWIW: looking at the online help for 2012 and 2013 it doesn't show any changes.

               

              Basics that I'm sure you know:

              Does the user have the "Search file locations for external references" checked?

              Does the user have any folders specified in the System Options > File Locations > Referenced Documents?

               

              Paul

               

              edit: I know those options are for "missing" files, but you never know.  I don't have locations specified so I'm looking in some off the wall ideas.

            • Re: Copied files still reference old location
              Alin Vargatu

              As per S-026634 in Knowledgebase:

               

              What is the order used by SolidWorks to search for referenced documents?

               

              1. RAM. If a file with the correct name is already in memory, it will use that file.

              2. The paths specified in the Folders list on the File locations tab (Tools> Options> System Options> File locations).

              3. The last path specified to open a document. When opening a parent document (e.g. an assembly), SolidWorks will search in the same directory for the referenced files.

              4. The last path used by the system to open a document. This will apply if the system opened a referenced document last.

              5. The path where the referenced document was located when the parent document was last saved. This is the path stored in the parent document except that the drive path (C:\, D:\) is considered to be the current drive.

              6. The path where the referenced document was located when the parent document was last saved with the original disk drive designation. The absolute path name stored with the parent document.

              7. If the referenced document still cannot be found, SolidWorks will ask to browse for the file.

               

              Note that all updated reference paths in the parent document are saved when you save the parent document.

                • Re: Copied files still reference old location
                  Charles Culp

                  Thanks Paul and Alin.

                   

                  I will continue working with him and I will see if we can get this resolved. I have a hunch that Paul's suggestion may be correct (#2 on Alin's list).

                  • Re: Copied files still reference old location
                    Jerry Steiger

                    Alin,

                     

                    I understand numbers 1 and 2.

                     

                    I don't understand number 3. How is that "last path" specified for a document? What does it mean to say "when opening a parent document", since it seems like a referenced document must have a parent?

                     

                    I don't understand number 4. What does "this will apply if the system opened a referenced document last" mean?

                     

                    Clarifying the search routine for referenced documents would be a great help to many of us.

                     

                    Jerry S.

                    • Re: Copied files still reference old location
                      Mark Olsen

                      Alin,

                           Something on the list doesn't seem quite right.  From my experience, not only is the drive letter sometimes ignored, but any other upstream folders are also ignored.  In other words, if the referenced file was last saved in ..\..\..\folder, then SW looks in ..\..\..\folder.  I regularly move files from c:\temp\folder_a\parts\... to w:\lots_of_folders\still_more\another_folder\folder_a\parts\... and all the parts on the new drive are found without issue.  Now that I think about it, SW looks at ..\..\..\ before the originally saved location. 

                    • Re: Copied files still reference old location
                      Charles Culp

                      Well, I can say most definitely, it is loading the existing file, not the one that was copied into the same directory. It is now reproducible, and I did it myself. It is not tied to search paths. The other user even said he opened up each individual part file first, then saved the assembly, and they are still linking to the original. There are no references between these parts except mates.

                       

                      Perhaps I should fill out a request with my VAR.

                       

                      I will test with other assemblies tomorrow.

                      • Re: Copied files still reference old location
                        Bjorn Hulman

                        I'm totally missing something here. When did references start being changed with a simple Windows Explorer Copy/paste maneouver? I've always been under the impression that this method would require a manual reference change. Or, as Tony suggests, disconnect the original referenced drive(s).

                        • Re: Copied files still reference old location
                          Dan Miel

                          Charles,

                                      I had one engineer say that when he uses pack and go to save an assembly to another location that it will sometime use files from the original location when he opens it in the new location. I spent a few minutes trying to reproduce it but I haven’t been successful at reproducing the problem. This has happened to him several times.

                          Dan Miel

                          SW 2013 SP02

                          • Re: Copied files still reference old location
                            Charles Culp

                            Thanks for the input, everyone.

                             

                            I have filed a support ticket with my VAR.

                             

                            This only happens with the one assembly, others behave as expected. I was able to duplicate it myself, even on the local drive. Even if I opened up the local part files first, it still showed a link to the network folder. I was able to finally clear it by shutting down my network card and then opening up the files, but it seems that as long as it could find those network files, it wanted to still stay linked.

                              • Re: Copied files still reference old location
                                Jim Sullivan

                                I have had issues like this when I did a copy and paste from our server to my computer.    I found a way to break the link to the server computer and create the correct link.   I just move the files from the original location to a temporary folder.    Then when I open the drawing in my computer it asked for the link because the original directory had been moved and the new location isn't known.   Then I just direct the link to the correct location.   Problem solved.    Then I put the original files back in the same place and throw the temp folder away.   I also had this happen when we restructured our engineering file folder locations.

                                 

                                Not sure if this is the same problem you are having?

                              • Re: Copied files still reference old location
                                Rick McWilliams

                                I have seen this problem. I use pack and go and change names of files to prevent this kind of disaster. I cant wait to see the spectacular variations on this theme that an inscruable datqbase on the cloud can produce.

                                • Re: Copied files still reference old location
                                  Jacob Johnson

                                  Same issue here and we have been using this method for years without issue.

                                   

                                  We maintain our designs on the network (no EPDM currently) when we have to work on one we simply go to the network - RMB> Copy, go to the desktop RMB > paste.

                                   

                                  Open the design and click find references - all files should be pointing to C:/

                                   

                                  In this case these files are peppered with about 20 of the 300-ish pointing to the network!

                                   

                                  I have cleared all the folders out of the settings for reference docs and search path. I also have never had the box checked to search folder paths.

                                   

                                  The only thing I can think of is that this particular design has been pack-n-go'ed on 5 occations and renamed as a new design. Now I realize this might have nothing to do with the issue here - but this hasn't happened in the past, and it is rearing its ugly head now on this project.

                                   

                                  I have even renamed the root directory on the network and it STILL finds it. I could disconnect my ethernet cable but, solidworks and more specficially our 3rd party addon references network locations. So while this would work I would lose the connectivity i need to actually "do" the work I have to do.

                                   

                                  The way I did it was to actually remove the design off of the network - Then open my desktop version and it works as expected.

                                   

                                  The problem there is now we are getting people emailing IT or design screaming the the entire design is GONE!!! That they have no access, and can not do tiher jobs... I have to explain that I took it off of the network and will put it back when I am done.

                                   

                                  Something is not right here - Any luck Charles on a response from your VAR?

                                    • Re: Copied files still reference old location
                                      Dan Miel

                                      We changed a setting in the options and it seemed to clear up the problems for our engineer who was having the most problems, unfortunately I did not record what we changed. We may have checked the “Search file locations for external references in Tools > Options > System Options > External References. We do not have any locations in the search paths under Options > file Location > Referenced Documents.

                                      The setting that we changed did not make sense but it worked for us.

                                      Dan Miel

                                      • Re: Copied files still reference old location
                                        Charles Culp

                                        I asked around, and we cannot remember fixing this in any meaningful way. By that I mean we did not fix the underlying problem. My VAR never actually closed the issue.

                                         

                                        To fix the particular files I remember we had to jump through some hoops, but I don't remember what. I even remember opening up the correct files in SolidWorks, doing a rebuild of the assembly, saving, and it still referenced the old location.

                                         

                                        In the mean time, we installed EPDM, and now these issues are not my concern. Sorry I couldn't be more help.

                                      • Re: Copied files still reference old location
                                        Bill Florac

                                        Anyone have a way to fix this yet?

                                         

                                        I have confirmed that it related to doing a "pack and go". Once a pack and go is done on an assembly, the assembly seems to be hard coded to the original path for the components. If you move the assembly and components to a new folder, the assembly will still reference the old folder. Even if you rename the original folder to hide it, open the assembly file in the new folder (in what looks to be the corrected path updates) and save it. When you unhide the original folder the assembly in then new folder will find and point back to the original folder again.  If you do this with a new assembly (not packed), it will alway find the local components.

                                         

                                        Odd, that when use the open dialog and have it show references, it displays it correctly to the local path.

                                         

                                        So far, I have not been able to unlink this other than to recreate the assembly from scratch.

                                          • Re: Copied files still reference old location
                                            Jacob Johnson

                                            Bill,

                                             

                                            We are finally moving to EPDM soon so this will no longer be an issue for me, but while it was an issue, my work around was a simple one. It might have been suggested up there.

                                             

                                            This is not a fix - just what I was doing to get by.

                                             

                                            Our files are stored on the network - we would pull a folder down to work on it and then put it back on the network when we finished.

                                             

                                            The problem was when we were opening files on the local hard drive it would reference some (not all) of  the components on the network.

                                             

                                            Our network folder is mapped to a drive on our local machines, so I simply right click and disconnect the network drive. Then open the project, and reconnect the mapping to the network drive.

                                             

                                            Windows stores all your mapped locations in the drop down of the drive mapping dialog window, so when reconnecting it's easy to choose the letter it was mapped to, and then in the path drop down just pick the last location.

                                             

                                            It's a lot of text lol - but the process is really a couple second ordeal.

                                              • Re: Copied files still reference old location
                                                Bill Florac

                                                OK, I'm not sure what causes these "hard links". I thought it was a Pack and Go but I can not reproduce it at will. Nor, can I find a way to identify the assembly files that have this in them. The hard links are "permanent" even after you delete the offending part. If you delete the part and put it back, it will still be hard linked.  Looking at the binary data of the assembly file, it seems there is some sort of history/log that is maintained and you can see the deleted part referenced a number of times. I have tried everything to remove them with little success EXCEPT by doing the following.

                                                 

                                                Pack and Go the entire assembly and its parts into a zip file (the zip file is the key). Then, simply close the assembly, open the zip file and replace the old one with the new one and BINGO, the hard links are now soft. You can move the assembly and its parts to anywhere and it will now find the parts in the local folder.

                                                  • Re: Copied files still reference old location
                                                    Jacob Johnson

                                                    I havent tested this but you can also try something like this. Are you showing all hidden files in windows under folder options?

                                                     

                                                    Im sure you are aware, but each file that is open has a corresponding ~ named hidden file. So Part1.sldprt would have a ~Part1.sldprt that is hidden.

                                                     

                                                    These should maintain themselves and disappear upon closing solidworks, but what I have found is if you crash Solidworks those hidden files do not dissapear. I have some directories FILLED with these hidden files and they don't disappear unless I physically delete them.

                                                     

                                                    Those temp files could have something to do with the links. Maybe this behavior has something to do with Solidworks crashing while being open on a network location... then those temp files are trapped in the folder and keep getting used when you open a file?

                                                     

                                                    Now I know that there will be people coming in here boasting that solidworks doesn't crash on them., but come  on... its solidworks...

                                                     

                                                    Just a thought - and like I said, I havent tested this.