17 Replies Latest reply on Mar 13, 2018 9:58 AM by Mason Benzinger

    Enterprise PDM Rebuild Task

    Rick Lacouture

      Is there an add-in task out there to rebuild files?  As you know, when we update a data card for a Model, the Drawing or Assembly needs to be opened and rebult in orfer for the properties to be saved.  It would be nice if there were a right-click task that would allow users to automatically rebuild without opening, rebuilding, saving, & closing each file.

      Any suggestions?

      -Rick

        • Re: Enterprise PDM Rebuild Task
          Richard Bremmer

          Would the file version upgrade tool do the job? You can find it in the directory in the installation files \SWDist\pdmwenterprise\Support\File Version Upgrade.

          • Re: Enterprise PDM Rebuild Task
            Raghavendra Bhagwan

            When you update the custom properties mapped to Drawing,Part / Assembly, You need not to rebuild to save. By default, The check-in would save the properties into the files.

              • Re: Enterprise PDM Rebuild Task
                Rick Lacouture

                But, what if I do not want to manually check out the files, so not to bump up the version? I would lke this task to rebuild multiple files. Rebuilding & Saving the SLDDRW files ensure the properties are pushed across the data cards and ultimately saved to a PDF.  Without this, we manually have to open each drw and do a Ctrl+Q, Save, & Print PDF. There has got to be users who run into this similar issue of rebuilding multipe files.

                  • Re: Enterprise PDM Rebuild Task
                    Charley Saint

                    Rick,

                     

                    Richard is pointing you in the right direction. The file version upgrade utility opens files, then rebuild and saves them. It also has the ability to overwrite existing versions, so you wouldn't be creating new versions.

                      • Re: Enterprise PDM Rebuild Task
                        Raghavendra Bhagwan

                        Charley,

                         

                        I think Rick wants to execute this task as on-demand basis for an assembly file, which has references. Running an File version upgrade tool everytime to accomplish this is an overkill i feel.

                         

                        Just my two cents !

                         

                        Raghav.

                        • Re: Enterprise PDM Rebuild Task
                          Brian McEwen

                          I didn't know about the SolidWorks EPDM File Version Upgrade Tool until you guys mentioned it.

                           

                          It sounded like a great solution. I'm in the boat where after migration most of our drawing data cards are blank - our properties are model based but mapped to the drawing. And the upgrade tool seemed to run fine (An aside - Even when I select drawings it upgrades all file types). I ran it on a small folder for testing. 

                           

                          However, the drawing data card was not updated!  I manually checked-out - saved - checked-in a file in the same folder and the data card filled in no problem.  I don't get it, I watched the Upgrade Tool open and save the files in SolidWorks. Any ideas? 

                           

                          I think I can't use the SolidWorks Task Scheduler because we are on SolidWorks Standard, so normally the Update Files task is not available to us... [edit - I did get this to work by using the Convert Task].  But the Upgrade Tool seems way cooler anyway - you can maintain Revision status and overwrite curent versions, it handles check-out-in, etc. 

                        • Re: Enterprise PDM Rebuild Task
                          Raghavendra Bhagwan

                          Rick,

                           

                          What i mentioned in my earlier post is, If you are updating the metadata in the datacard of a file, and if that variable is mapped to a custom property of part,assembly or drawing, The metadata will be populated automatically to the file on the save event of the data card.

                           

                          So one need not to open the file to rebuild it. They can simply check-in the file.

                           

                          Hope this clarifies your doubt !

                          • Re: Enterprise PDM Rebuild Task
                            Ales Svoboda

                            If you want to only generate PDF and print it you don't have to check out, open drawing, ctrl-q and check in to update properties on drawing title block. When default Export task is creating PDF, it opens drawing and save PDF with up to date properties. Isn´t it?

                             

                            But if anyone opens your drawing files (slddrw) with edrawings it is problem, the drawing will not be up to date.

                        • Re: Enterprise PDM Rebuild Task
                          Laura Whittle

                          We are also interested in having a task to rebuild files.  I just looked at the solidworks Task scheduler and it will upgrade the files nicely. However we need to have all the files checked out first and then would need to check them all in.  We would like to run this task once a week over the weekend. 

                           

                          I am thinking we would need to make a task in epdm to check out all the files, then run the solidworks task, and then have another epdm task to check the files in Sunday evening.

                           

                          Any other ideas out there? 

                           

                          Thanks!

                          • Re: Enterprise PDM Rebuild Task
                            Rick Lacouture

                            I appreciate the input, but I still have been searching for a script or macro to do this rebuild.

                             

                            It may seem a bit weird, but this is how we setup Enterprise PDM and are in too deep to make it work differently.  The SLDPRT & SLDASM data cards populate the SLDDRW cards which populate many properties on the drawing (Titleblock, Revision, Material, ECN info, etc.).  We produce and provide PDF files to our vendors & manufacturing facilities because they, unfortunately, are not tied into the PDM system.  We manually open each SLDDW, "super" rebuild (CTRL + Q), create the PDF, save & close.  Just checking out & checking in the files do not update the properties on the drawing/final PDF as Raghavendra suggested.

                            Does anyone know of a script or add-in that could help?

                            Like I said in my original post, "There has got to be users who run into this similar issue of rebuilding multipe files."

                             

                            -Rick

                            • Re: Enterprise PDM Rebuild Task
                              Shane Suffolk

                              Hello everybody. I've got a variation to this issue.

                               

                              We've been using the Solidworks Task Scheduler to update Soldiworks drawings to reflect the data card info of the part/assemblies for most of our database and it worked for the vast majority of the files. However, on some drawings (roughly 1100) the Task Scheduler failed with a 'Referenced file(s) read-only' error. On these files the data card properties haven't been transferred to the drawing data card.

                              Although I did find a way to get rid of the error and complete the Task successfully (checking every single part/assembly out under the particular drawing) it still didn't update the data card.

                              So, I turned my attention to the EPDM File Version Update Tool. Unfortunately, even when I select to force a rebuild and run it for files that are already in the latest version of Solidworks, the data card on these drawings are still not updated.

                               

                              In the end I found that the only way to get the drawings to import the data card info of the part/assemblies is to do a Check-out, Open, CTRL+Q, Save and Check-in. Hence the reason why I'm replying to this old thread because I am now also in need of a EPDM Task that does this.

                              Unfortunately I'm terrible at API so I was hoping that there is someone out there who might have a EPDM Task script that does an Open, CTRL+Q and Save as a minimum (but preferably also including the Check-in and Check-out).

                               

                              Anybody?

                                • Re: Enterprise PDM Rebuild Task
                                  Brian McEwen

                                  I feel your pain Shane. 

                                   

                                  There is one other thing you can try before API... I found out that the EPDM File Version Upgrade Tool (FVUT) does not update drawing data cards because it launches SolidWorks without the EPDM Add-in.  However, if you have SolidWorks open with the Add-in when you start the FVUT it will use that session, and it will update drawing cards!  The caveat is that for me (6 months ago) SolidWorks always crashed after a handful of files - and then the FVUT relaunches SolidWorks without the add-in, and the rest of the cards don't get updated.  I may try it again.

                                   

                                  So a simple improvement (with big benefits) to the upgrade tool would be to have an option to use the EPDM Add-in. 

                                   

                                  The Task Scheduler is also a disappointment because of needing to check-out every referenced file. Plus I found that I needed to add every folder to the convert task separately, or the file paths where wrong and it did not find the files. I did not see a case where the Task Sched Convert task that worked did not update a data card.

                                   

                                  If you do get an API for updating the data cards I would also be very interested.

                                    • Re: Enterprise PDM Rebuild Task
                                      Shane Suffolk

                                      Thank you for that Brian,

                                       

                                      If I open up Solidworks and then run the FVUT, it does update the file but only if I have it create a new version. If I set the FVUT to overwrite the latest version it still doesn't update. Furthermore, even though I've selected to update only slddrw file, the FVUT then creates a new version of all the parts and assemblies under the drawing which is unacceptable to me.

                                      On a side note, and I didn't test this, but what if you open up several instances of Solidworks (with the EPDM Add-in loaded) and then run the FVUT on numerous files. If the FVUT crashes, would it then use one of the open instances of Solidworks instead of opening up its own instance?

                                       

                                      Anyway, I've ended up writing a dispatch script which just reads all the data card properties of my sldprt or sldasm and copies them to the slddrw. This works for me as the slddrw in in the same folder as the sldprt or sldasm and has the same name. It's not the quickest script but al least it's automated now.

                                       

                                      Thanks for your help.

                                        • Re: Enterprise PDM Rebuild Task
                                          Brian McEwen

                                          Interesting idea about having multiple SW sessions open, I'll try it out.

                                           

                                          I did not think of using Dispatch that way, I could certainly do it for some key properties. Are you running it based on a search? So you pick some folders and look for blank values in some variables, and then run it on that batch of drawings, and repeat?

                                           

                                          Are your files not sitting in a released state? Because Dispatch will create another version, and it is not able to revision stamp the files (I think). To rerelease our drawings I have an Admin transition that checks the revision and re-stamps. All our drawings are sitting in a released state (but they are not EPDM Revisions because the migration workflow didn't know what letter to assign, due to blank data cards).  In retrospect it was probably a mistake to auto transition the drawings to Released, should have fixed cards first.

                                           

                                          As far as the FVUT creating another version, of the drawing or the referenced files - it may bother our neat and tidy side, but if you put it in perspective it is not actually important. An aside - for cleanup when history gets messy, it would be nice if there was a way to clear out old versions: with Rollback we can delete the versions at the end of the History list, but there is no easy way to delete some of the beginning versions (until it reaches the Cold Storage limit). But maybe it is best not to waste time on that anyway, leave it to Cold Storage.

                                           

                                          Thanks for the ideas.

                                    • Re: Enterprise PDM Rebuild Task
                                      Gary Hamm

                                      Have you had any luck,..???

                                      I am having a similar issue where I want the files to be rebuilt in the transition so when the are viewed in Edrawings they file have been rebuilt correctly. Would love to have it perform a tasks during the approval transition.

                                      thanks

                                      Gary

                                      • Re: Enterprise PDM Rebuild Task
                                        Mason Benzinger

                                        DBWorks has an out-of-the-box option to rebuild files on release.   I don't understand why this is not, nor ever has been, the standard MO for SW PDM. Maybe someone with knowledge would offer an explanation?

                                         

                                        In the KB, there is an enhancement request to add this functionality. SPR 606878.  Log into your customer portal accounts and attach to it! Each time you switch employers, attach to it again using the new serial number :-)