Author Topic: Element Types/Stereotypes & their properties/TVs for the active language  (Read 3646 times)

adepreter

  • EA User
  • **
  • Posts: 187
  • Karma: +10/-9
    • View Profile
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
« Last Edit: February 01, 2024, 01:47:52 am by adepreter »

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13387
  • Karma: +566/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Element Types/Stereotypes & their properties/TVs for the active language
« Reply #1 on: February 01, 2024, 02:35:25 am »
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

adepreter

  • EA User
  • **
  • Posts: 187
  • Karma: +10/-9
    • View Profile
Re: Element Types/Stereotypes & their properties/TVs for the active language
« Reply #2 on: February 01, 2024, 04:12:16 am »
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?

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13387
  • Karma: +566/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Element Types/Stereotypes & their properties/TVs for the active language
« Reply #3 on: February 01, 2024, 07:06:04 am »
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