Hi all,
Is it possible to control diagram element with scripts?
I need the following to functions:
- select all ports of an element
- hide/unhide all ports of an element
Thanks a lot in advance for your help,
Michael
Hi Michael,
first of all, yes, that's possible, Diagrams are managed and stored the same way as other models, there is a "Notation" meta model behind (Shapes, Nodes, Styles).
In practice its a bit tricky to script them. A starting point could be diagram.js which is floating in this forum as well and which I attached for your convenience.
There is a "getShapes" method to get all shapes of an element on a given diagram for example. And I think you can delete that shape afterwards.
Jan
Hi Jan,
Thanks for the hint with the "diagram" scripts. I was sucessful and I want to share what I learned:
Thanks Michael for your lessons learned. Some questions about that: