Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: Clemo on July 15, 2014, 10:24:07 pm

Title: Deleting diagrams
Post by: Clemo on July 15, 2014, 10:24:07 pm
Hi,

I just cannot seem to find the method to delete a diagram using the Java API, tried destroy() but seems to have no effect!

Can anybody point me in the right direction

Clemo
Title: Re: Deleting diagrams
Post by: Helmut Ortmann on July 15, 2014, 10:38:40 pm
Hi Clemo,

diagrams are created and deleted in the context of the owned element. Here: Package or Elements may contain Diagrams. Details see at Attribute Diagrams (collection) in the API object reference.

You can add/delete diagrams on the collection of diagrams in Package or Elements. The command is: Delete(short index) or DeleteAt(shortIndex, refresh).

Thomas Kilians e-book ScriptingEA may be a good help to understand and master the EA API.

Helmut
Title: Re: Deleting diagrams
Post by: Clemo on July 16, 2014, 12:18:47 am
Thanks Helmut.