Hi
I need to check in JavaScript (EA V14.0) if an element (e.g. Activity, Component) is used in any diagram.
i.e. the same as doing Find in all Diagrams (^U) in the project browser
The best I can find at the moment is:
1) get all the model diagrams
diagramList = Repository.GetReferenceList("Diagram")
(I assume this is the same as walking down the entire project tree looking for diagrams - but much faster)
2) nested on all diagram objects, and on all DiagramObjects in each diagram
3) Check if the DiagramObjects refers to the required element
Here is where I'm stuck.... How do I find the ID of the element being referred to by the diagram object?
In the UI Diagram Properties, I can see that it in the Behavior Tab, Behavior Field, as a long string of type Package::SubPackage::ElementName
a) How do I convert that string to the ElementID or how do I get the path to the ElementID to compare them?
c) What is the Behavior Field and how do I access it ?- it is not mentioned anywhere in the API reference
Thanks
Yonatan