cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Trigger macro on diagram save/dispatch

CYoung
New Contributor

Hi,

 

How do you trigger a macro when a diagram is saved/dispatched?

i.e. we would like to save the diagram as a png when it changes.

 

I can't seem to find any documentation on this.

 

Thanks

2 Replies

Thanks. Found the documentation.

Search for 'OnSaveDrawing' in here:

http://community.mega.com/mega/attachments/mega/HOPEXV1R2/10/68/All%20about%20starting%20with%20APIs...

SVanSchoonlandt
Honored Contributor

you need to create a diagram plugin with a sub

Sub OnSaveDrawing( oDrawing As MegaDrawing )

End Sub

it's all described in the pdf Diagram API tutorial. The script will fire when the diagram is saved by the user.