Getting taggedvalues in runtime without code
No edit summary
No edit summary
Line 1: Line 1:
When you use WECPOF you can create a whole system with use of the Model alone.
When you use WECPOF, you can create a whole system with the use of the model alone.


As you do you might want to pick up information stored in the TaggedValues of the model.
As you do, you might want to pick up information stored in the TaggedValues of the model.


You can do that like this:
You can do that like this: G.allinstances->first.oclType.TaggedValue('Eco.PresentationUnit')


G.allinstances->first.oclType.TaggedValue('Eco.PresentationUnit')
However, this approach will not let you get to TaggedValues on features like attributes or association ends.


But this approach will not let you get to TaggedValues on features like attributes or association ends.
For this purpose, we added TaggedValueOnFeature.  


For this purpose we added TaggedValueOnFeature. Use it like this:
Use it like this: G.allinstances->first.oclType.TaggedValueOnFeature('Eco.PresentationUnit','SomeAttribute')
 
G.allinstances->first.oclType.TaggedValueOnFeature('Eco.PresentationUnit','SomeAttribute')
[[Category:Tagged Values]]
[[Category:Tagged Values]]

Revision as of 06:38, 22 March 2023

When you use WECPOF, you can create a whole system with the use of the model alone.

As you do, you might want to pick up information stored in the TaggedValues of the model.

You can do that like this: G.allinstances->first.oclType.TaggedValue('Eco.PresentationUnit')

However, this approach will not let you get to TaggedValues on features like attributes or association ends.

For this purpose, we added TaggedValueOnFeature.

Use it like this: G.allinstances->first.oclType.TaggedValueOnFeature('Eco.PresentationUnit','SomeAttribute')

This page was edited 114 days ago on 02/10/2024. What links here