Sparx Systems Forum
Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: adepreter on February 01, 2024, 01:37:59 am
-
Hello,
How could I get the list of element types/stereotypes and their properties/tagged values for the active language?
Thank you in advance,
Alain
-
You can't, unless you parse the MDG file.
And the MDG file can be binary encoded, stored locally or on an url, or stored in the database.
The local or url files, are pretty doable, but I haven't found a way to read an MDG stored in the database, or in an encoded binary file.
Geert
-
Thank you Geert :)
So the trick would be to
- Get the ID of the active MDG. Maybe by getting the prefix of the active diagram... (if any)
- Identify the path/url of the active MDG file (need to figure out in the case where it is not in Program Files)
- Load and parse the xml file
Would that make sense?
-
Thank you Geert :)
So the trick would be to
- Get the ID of the active MDG. Maybe by getting the prefix of the active diagram... (if any)
- Identify the path/url of the active MDG file (need to figure out in the case where it is not in Program Files)
- Load and parse the xml file
Would that make sense?
Yes, but that would only work for the few cases where the MDG is loaded from an actual XML file.
As indicated, you can also load MDG file in the database, and some MDG are loaded from the InternalTechnologies folder. (C:\Program Files (x86)\Sparx Systems\EA\InternalTechnologies)
Although these files have a .xml extension, they are in fact binary files.
To me it looks like you are chasing rainbows here. Whatever solution you end up with, will have cost lots of effort, for very little benefit.
Geert