Sparx Systems Forum
Enterprise Architect => General Board => Topic started by: BastienF on January 17, 2025, 12:05:45 am
-
Dear community,
I would like to attached metadata to some class elements. I wonder what is the best way to represent it between attributes and tags.
Here are some questions that could help me for this choice.
1° Is it possible to export attributes in a similar way that Tags can be exported and imported to CSV (see tutorial link (https://sparxsystems.com/enterprise_architect_user_guide/17.0/model_exchange/csvspecifications.html))?
2° Can inherited tags be exported through the CSV method?
It means that if class element A inherits a tag value from class element B. Then the tag value appears for element A and element B in the csv.
3° Could some graphical elements of the diagram be linked to the value of an attribute or a tag?
For instance, a tag has 2 possible value: ON/OFF. If the value of the element is ON, then the background color of the element is automaticaly set to green. If the value is OFF, then the background color is automaticaly set to red and the text size is smaller and bold.
Thanks in advance
BastienF
-
If it's metadata, it should go into tagged values.
If it's data then it should be modelled as attributes.
1. No, you can't export attributes with the CSV import/export feature
2. No, I don't think "inherited tags" are exported to CSV. There is also not really an "inherit" when it comes to tagged values. Each element has it's own set of tagged values. I know EA kinda makes you think that, but that is purely a visual GUI thing.
3. You can query the tags in a shapescript, but not the attributes. So you can do the color thing with tags, but not with attributes.
Geert
-
Thanks a lot for your answers, Geert.
I'll dig into the shapescript.
BastienF