Last Updated on by
Are you an employee that uses EPDM but you only view the preview tab when looking at a SolidWorks Drawing? If so, you might have noticed that at times values or notes of a drawing do not represent the part file correctly. This is because whenever a note or value on a drawing is linked to a part file the drawings preview does not update automatically until after the drawing is opened and rebuilt.
This error can lead to mistakes in production, orders, and just plain confusion. Fortunately, you can combine the power of EPDM API and SolidWorks API to automatically correct the problem for you. Here at DesignPoint Solutions, we created an Add-in that automatically checks if a drawing needs to be rebuilt after every time a drawing is checked in or moves through a workflow state. Moreover, you can turn on the option for part files to update their drawings every time they are checked back into the vault.
If you are feeling adventurous you can create the Add-in yourself. The needed SolidWorks API method would be modeldoc2.editrebuild3. That is pretty much it! EPDM API will take care of checking if the drawing needs to be rebuilt using the iedmfile7.needsregeneration method.
Now just create a standard EPDM add-in with hooks on check-in/state change and check if the file is a drawing file. Finally, if the iedmfile7.needsregeneration returns true you open the file and push the modeldoc2.editrebuild3 method.