Reading a tagged value

ECO allows you to add TaggedValues (name/value pair) to your model at design time.  Here is how to retrieve the value of a TaggedValue at runtime.

obj.AsIObject() gives IObject
IObject.UmlType gives an IClassifier
IClassifier is an IModelElement, therefore....
IClassifier.TaggedValues['hello'] gives ITaggedValue
ITaggedValue.Value gives the string

ClassDisplayName :=

IProperty is also an IElement, so you can get tagged values for properties in exactly the same way.



Share this article!

Follow us!

Find more helpful articles: