19 Replies Latest reply on Nov 6, 2017 4:31 PM by Bill Bothe

    Assembly File Missing References

    Charles Culp

      We have many assembly files that are completely missing their referenced components. If you open up the assembly in SolidWorks, there are 10 parts in the assembly. If you look in the "Contains" tab, EPDM only sees 4 components. This error is due to a bad import into the vault when we first imported all of our legacy data last year.

       

      Today, we have files that were improperly imported, reviewed and revised by engineers, submitted for approval, and are now in an approved state. They are still referencing some files out of the vault, because SolidWorks is able to look out of the vault and find them, and EPDM does not recognize that those files are components in the assembly.

       

      Does anyone know of a tool to re-associate these missing files with the assembly? The "Update References" tool only works when EPDM recognizes that the assembly has components to begin with. I need a way for SolidWorks to tell EPDM that those references exist to begin with.

       

      As you can imagine, this is becoming a very large headache for us, because the EPDM "Contains" tab is unreliable, and often incorrect. I find this to be an unacceptable condition for a PDM system.

        • Re: Assembly File Missing References
          Jim Sculley

          Charles Culp wrote:

           

          We have many assembly files that are completely missing their referenced components. If you open up the assembly in SolidWorks, there are 10 parts in the assembly. If you look in the "Contains" tab, EPDM only sees 4 components. This error is due to a bad import into the vault when we first imported all of our legacy data last year.

           

          Today, we have files that were improperly imported, reviewed and revised by engineers, submitted for approval, and are now in an approved state. They are still referencing some files out of the vault, because SolidWorks is able to look out of the vault and find them, and EPDM does not recognize that those files are components in the assembly.

           

          Does anyone know of a tool to re-associate these missing files with the assembly? The "Update References" tool only works when EPDM recognizes that the assembly has components to begin with. I need a way for SolidWorks to tell EPDM that those references exist to begin with.

           

          As you can imagine, this is becoming a very large headache for us, because the EPDM "Contains" tab is unreliable, and often incorrect. I find this to be an unacceptable condition for a PDM system.

           

          When you open one of these assemblies in SW, what does the EPDM task pane show for the outside the vault components?  The blue dot with a slash through it?  If so, it clearly knows that the reference exists and is outside the vault so the 'Update References' tool should be able to correct it.

           

          If I recall correctly, the Update References tool requires that you have check out rights for the state the file is in in order to update the references.  Perhaps because your files are in an approved state you cannot update the references?

           

          Jim S.

          • Re: Assembly File Missing References
            Greg Johnson

            In ePDM there is an Update References command in the Tools dropdown menu.

             

            It would be nice if this tool could be used on the entire vault. We have missing references in 10-25% of our assemblies.

             

            Are there any other solutions for this problem?

             

            Greg Johnson

              • Re: Assembly File Missing References
                Charley Saint

                Hey Greg,

                 

                Funny story, I actually had to do this for our vault to when I took it over. It's a giant pain to setup but works pretty well, and you don't have to buy anything haha. Basically you have to create a full copy of your vault because you're about to destroy it. Get you VAR involved if you need help because there's no straightforward way to do this, but it's good practice for disaster recovery. Once that's created run the file version upgrade utility on the whole vault, and tell it to upgrade everything, including files already in the target version. That'll take some time, but it will generate a log file about the status of every file in the vault and any missing references that you can run through and clean up. I used this python script to parse the whole thing, your IT should be able to run it for you if you're unfamiliar.

                 

                infile = raw_input("Enter your full input filepath: ");
                outfile = raw_input("Enter your full output filepath: ");
                inputfile = open(infile , "r", 1)
                outputfile = open (outfile, "w", 1)
                while 1:
                    line = inputfile.readline()
                    if not line:
                        break
                    if "WARNING: Referenced file" in line:
                        refs = "\t" + line[line.find("]")+2:]
                        while 1:
                            line = inputfile.readline()
                            if not "WARNING" in line:
                                outputfile.write( line[line.find("]")+2:line.find("' ")] + "\n" + refs + "\n")
                                break
                            refs = refs + "\t" + line[line.find("WARNING: "):]
                    elif "WARNING:" in line:
                        refs = line[line.find("]")+2:]
                        while 1:
                            line = inputfile.readline()
                            if "Some sheets contain drawing views that are out of date with their external models." in line:
                                break
                            if not "WARNING" in line:
                                outputfile.write( refs + "\t" + line[line.find("]")+2:] + "\n")
                                break
                            refs = refs + "\t" + line[line.find("]")+2:]
                        
                inputfile.close()
                outputfile.close()
                
                

                 

                If all that sounds like way too much work you can pay these guys to fix it for you (David Cramer) or dcramer@levitekcorp.com , we used to recommend them all the time when I worked for a VAR. Now it's just an unpaid solicitation for some guys I know do good work

                • Re: Assembly File Missing References
                  Bill Bothe

                  I replied to this post but it applies to other posts and replies in this thread.

                  I tested this method that seems miraculously easy.  Before, some assemblies opened from the temporary folder were finding references from the original location and other places.  After, those assemblies opened from the vault found their references, in what ever folder they were in, in the vault.

                   

                  Background, we have 22000 solidworks files in 50 folders we want to move from a windows folder to the vault, keeping the same folder structure.  This test was done with a few hundred files with about 20 top level assemblies.  There were already many files added and checked in from previous tests.

                  1.     created a list of files to migrate.  This list has duplicates removed.

                  2.     using the list, copied the folders with files to a temporary folder and maintained - I will not modify nor delete anything from the temporary folder until the migration has been tested and vetted and the files also separately archived.

                  2a.     opened some assemblies, did a "find references" and noted where the references are found.  Exported the list.

                  3.     for the test, I added 1 folder to the vault but did not check in, yet.

                  4.     in the vault folder, sorted by file type and selected all of the assemblies.  From the menu, selected update references.  In the box, selected find files.  Reviewed the warnings and cancelled update references to resolve some issues like duplicates (from testing) and files not found (in folders not yet added).  Rerun update references and once any remaining warnings were acceptable, clicked ok.  clicked update.  The box closes.

                  5.     check in the assemblies, along with any references and drawings.

                  6.     open the same assemblies from step 2a, from the vault, did "find references" and compared with the previous time.

                   

                  I did this a couple of times with small batches of files.  The time to process from step 2a to step 6 was > 20 minutes and < 1 hour (did this while working my normal job).  For the actual migration I hope to have a second computer that can sit and wait while the vault processes a large list of file while I continue doing my normal job.

                   

                  Another help:  you can do a vault search on multiple files so you can select and process files from multiple folders in one step instead of individually.  Enter each file name separated by a space in the file name search block.  I create lists in excel and reformat them into one cell which I copy and paste in the vault search/file name block.  This is especially helpful for a folder that has thousands of files.

                • Re: Assembly File Missing References
                  Martin Solem

                  Hi Charles,

                   

                  Just my thoughts, and something to test:

                  Today, we have files that were improperly imported, reviewed and revised by engineers, submitted for approval, and are now in an approved state. They are still referencing some files out of the vault, because SolidWorks is able to look out of the vault and find them, and EPDM does not recognize that those files are components in the assembly.

                  First thing you could do is break the old reference path.

                  This is done by adding or changing a folder name in the old file path, say the files were located in "G:\SolidWorks\Projects" then change the path like "G:\SolidWorks\Projects_old". This will force SolidWorks to locate the file using it's search order:

                   

                  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)

                   

                  Does anyone know of a tool to re-associate these missing files with the assembly? The "Update References" tool only works when EPDM recognizes that the assembly has components to begin with. I need a way for SolidWorks to tell EPDM that those references exist to begin with.

                  With the old reference path broken, SolidWorks with EPDM should find all files within the vault. Check everything out, rebuild and save, check in. The check-in dialog should at least give you an impression if all referenced files are listed,

                   

                  Kind regards,

                  Martin

                    • Re: Assembly File Missing References
                      Seth Schroeder

                      Hey Martin,

                       

                      Great information by the way, thanks. I'm trying to get the File Version Upgrader to work and FORCE it to look for the files missing from assemblies. I have our Vault Projects folder selected in System Options > File Locations. I also have it set to look in sub folders. If I have recently opened one of the missing files it will find them and automatically re-reference the part! (Via your number 3). This makes me believe that System Options > File Locations does not work correctly.

                       

                      I was told that SolidWorks does not search by file name but by some sort of "reference number" and that this number may change?

                       

                      My Question: Is there a way to force SolidWorks to look in ALL of our project sub folders, and search ALL previous versions of files for this "reference number" or a matching file name?

                       

                      I feel like this would be helpful for so many businesses, I know it would be for us.

                       

                      Thanks again in advance,

                       

                      Seth

                        • Re: Assembly File Missing References
                          Martin Solem

                          Hi Seth,

                           

                          I am not sure i know the answer to that one. But first of all, do you have a cached copy of all files in the vault? Solidworks will not be able to locate a file unless you have a version cached on your local computer, because it does not care whether PDM is installed or not.

                          If you do a "Get latest version" on the entire Projects folder, does the result when opening in Solidworks change?

                           

                          Some years ago we had to specify each and every folder in the vault to get Solidworks to search properly. That was a nightmare to set up, and we ended up with 40 something registry strings containing document search paths.

                          From what i could find in the Knowledge Base right now, it's still like that. (See solution S-031013 and SPR-60258).

                          The short version is: Solidworks is not a search tool.

                           

                          I do not think the internal ID of a document can change, and i think that problem only rises if you have files with duplicate names, or have replaced a file.

                           

                          Kind regards

                          Martin

                            • Re: Assembly File Missing References
                              Bill Bothe

                              We are working towards migrating legacy files into a vault that is "in use".  One of the pre migration tests was: will an assembly find its references if all I did was add and checkin everything (to a sandbox vault).  The answer for us is no because we use multiple folders in various layers of sub folders that the solidworks search algorithm cannot follow.  After conducting other tests and adding a few files here and there to the sandbox vault, I open an assembly and it found everything.  Then I cleared the cache and reopened the same assembly and it could not find some of the references.  I added all of the vault folder paths to solidworks///"referenced documents" and check "external references..." to use the paths.  Reopened the assembly with same results, missing some references.  Point to me is setting the "referenced documents" with all of the vault paths will not work in the vault....we are using solidworks 2016 sp5.0, epdm2016.

                               

                              I am still testing but the best approach for us to add our legacy files is looking like this: 1) add all files to vault, 2) do "update references" on each assembly and it should find all of the references and save each assembly, 3) check in all files.

                                • Re: Assembly File Missing References
                                  Charley Saint

                                  Try adding search paths to the EPDM search routine in the admin tool:

                                   

                                  • Re: Assembly File Missing References
                                    Martin Solem

                                    Hi Bill,

                                     

                                    It is my understanding that maintaining relative paths should work. It is one of the import strategies from SOLIDWORKS.

                                    SOLIDWORKS will find referenced files based on the relative path between parent and its referenced children.

                                    What that means is that i need to find a top-level folder in the folder tree, and copy that and all relevant subfolders.

                                    Consider this folder structure:

                                    Scenarios:

                                    1. My assembly is located in Project1 and has referenced parts in Project2 and Project3. That will make Projects the top level.
                                    2. My assembly is located in Project1 and has referenced parts in Purchased Parts. That will make Engineering the top level.
                                    3. My assembly is located in Project1 and has referenced parts in Products. That will make F:\ the top level.

                                     

                                    With Scenario 3, i have this Assembly, details from Find References in SOLIDWORKS:

                                    Since Top level is F, i need to put all relevant subfolders in the same folder:

                                    And now, when checking in, i see that all files have been found where i expect them to be, all i did was replace "F:\" with "C:\Test\Import".

                                     

                                     

                                    That is, at least, the principle.

                                     

                                    Martin

                            • Re: Assembly File Missing References
                              Bill Stadler

                              Using the rollback feature can cause the contains and where-used tab to incorrect as well.