Author Topic: Deleting diagrams  (Read 3311 times)

Clemo

  • EA User
  • **
  • Posts: 25
  • Karma: +0/-0
    • View Profile
Deleting diagrams
« 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

Helmut Ortmann

  • EA User
  • **
  • Posts: 970
  • Karma: +42/-1
    • View Profile
Re: Deleting diagrams
« Reply #1 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
Coaching, Training, Workshop (Addins: hoTools, Search&Replace, LineStyle)

Clemo

  • EA User
  • **
  • Posts: 25
  • Karma: +0/-0
    • View Profile
Re: Deleting diagrams
« Reply #2 on: July 16, 2014, 12:18:47 am »
Thanks Helmut.