Sparx Systems Forum
Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: kjourdan on March 30, 2016, 01:20:37 am
-
I working on some scripts (Jscript) that manipulate elements on a diagram. The scripts would fail if the diagram was not saved prior to running the script. I can add the logic to save the diagram. However, I would prefer to check if the diagram has been modified and not saved. Then I can prompt the user to either cancel out of the script or press OK to save. If there are no changes, this prompt could be avoided. Is there a way, through the scripting to know if the diagram (DiagramID) being operated on is modified and not saved? I do not see any diagram attributes that would indicate this.
-
You can't find that out. If you issue a diagram close, EA will ask to save. But there is not flag.
q.
-
I had the same problem and I just saved the diagram to be sure not to loose anything.
Geert