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

    Automate force rebuild on transition

    aaron schiel

      I am trying to automate a force rebuild on a transition.  The reason is that I am trying to update a drawing with who it was approved by and date, so this information is not always present.  But when I change a state, the info is updated on the drawing card and custom properties through Set Variable.  If you look at the preview after the transition, the updated info is not present however.  But it shows up if you open the solidworks drawing and save it because the custom properties are there.  But I need this to be automated.  Is there anyway to do this during a state trasition.  I have tried through creating a task and a dispatch action but have been unsucessful.  I think I need to be able to check the file out, rebuild it, save it and check the file back in.  So doing this through a task script seem like the most logical way to do this.  But I am new to the language, so I don't know what the script should look like.  Any help would be greatly appreciated.

        • Re: Automate force rebuild on transition
          Pedro Branco



          What version of EPDM are you using?


          as from eDrawings 2008 it was added support for showing  updates in title block annotations linked to drawing custom properties  ($PRP links, linked to Drawing File Properties) without having to open and resave the drawing in  SolidWorks. This means that if a drawing custom property is linked to a  variable in the drawing data card, an update to that variable (for  example when a workflow transition changes state on a file and writes  the revision number to the card), the updated value should be visible in  eDrawings preview instantly.


          However, this display update will  only work if the actual custom property (for example "Revision") exist  in the drawing when it is created and saved.  If the title block is  linked to a custom property not yet created in the drawing - and the  property is created as part of the variable update (i.e. when revision  is written to the card, the custom property is created at the same time)  - any such annotation updates will not be seen unless the drawing is  opened and resaved in SolidWorks at least once, thereby having the  custom property present upon save.  A workaround for this limitation in  2008 and 2009 SP3 (and lower) is to create a placeholder value in the  custom property, for example a dash "-" or similar, so that it exist in  the drawing and updates can be seen in eDrawings directly.


          With  SolidWorks 2009 SP4, the drawing format was extended to add support for  eDrawings to also see updates done to custom properties not yet present  upon drawing creation - thereby solving this problem as well.  Note  however that the drawing must have been saved or created by SolidWorks  2009 SP4 or higher and viewed with eDrawings 2009 SP4 or higher in order  for this to work.




          Pedro Branco

            • Re: Automate force rebuild on transition
              Rick Lacouture

              This is basically the same thing I'm running into.  I understand that the custom property push ($PRP) works, but it does not stay with the DRW until the file is opened, rebuilt, and saved. Which means, Check-Out, Open, Rebuild, Save, Close, and Check-In.  I have been given macros that will do the SolidWorks automation; now I need a Task to run that macro and do the check out/ check in automation within PDM.  I tried to find a way to make the Dispatch Add-in call out at Macro, but failed.  Any ideas?

              I posted a similar question that really didn't get answered for what I need.

              Enterprise PDM Rebuild Task

            • Re: Automate force rebuild on transition
              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 :-)