question-circle How to access the information of diagram elements programatically?

3 months 2 weeks ago #6551 by superGuerreiro

I'm currently listing all the elements in a class diagram through the functions getRepresented() and then getCompositionChildren(). I would like to, for example, in the case of a class, get its attributes and methods, along with its relationships, in order to display them through a dialog box. Essentially, I want to be able to access the information that is relevant to me, in the form of text strings, regarding each MObject in the diagram, programatically.

My idea right now would be to see if each of these MObjects is an instance of Class, Attribute, etc. and try and get this information from each of these specific interfaces, but this doesn't seem to directly give me what I want.

I assume there must be another way, since in Modelio's interface, I'm able to see this information, listed in the diagram view. I attached a picture illustrating what I mean. How do I access this information programatically?


Please Log in or Create an account to join the conversation.

Moderators: tmachmaab
Time to create page: 0.039 seconds
^ Back to Top