Add-in for Loading Document Save Custom Macro

Hi,
Trust you are well.

We are currently in the process of integrating SW 2018 with Dynamics NAV ERP.
Accordingly, we are using few methods to automate creation of SW document properties/metadata so that the same can be pushed to NAV.

Location of the drawing pdf file is one such field we are automatically generating while finalizing SW metadata. This path will be linked to corresponding item in NAV.

The file location will be generated before the drawing file has been actually created and the location will automatically flow from 3d document custom properties to file properties in the corresponding drawing document and when the designer saves any changes in the drawing document, a pdf copy of the drawing will be automatically updated at the said file location.

We have been able to address this requirement through a macro, but this macro has to be loaded in the SW environment to have the intended effect. While we are able to address this using the command line extension but this fails to address cases where the designer might directly initialize the SW environment by double clicking on a 3d document.

I was wondering if there’s an add-in that could let you load other custom macros by pointing to their locations. Also open to other suggestions for addressing the original problem.

Best regards.

You can set the macro to load with the SOLIDWORKS. This way the macro will always be running in the background. Here is the process Run SOLIDWORKS macro automatically on application start

Other options is to check these tools:

http://www.lennyworks.com/solidworks/SWXMacros/MacroLaunch.zip

1 Like

Thanks, I have already tried using the /m command line argument. It doesnt address situations where solidworks is initialized by double clicking on an associated file. Would CAD+ toolset address this situation?

You can use this framework to write an add-in that does that.

Here’s a demo I did a couple of weeks ago: Blue Byte Systems SOLIDWORKS SDK: Prevent users from editing custom properties. - YouTube

1 Like