GOTCHA: MagicDraw/Cameo: SysMLv1/UML: If you can extract model info using an OpaqueBehavior and you can see that in the Evaluation Mode in the Expression Editor it might not appear in a column in the Generic Table Diagram because the final Type is not set

Icon class
icon_class
far fa-sticky-note
icon_class_computed
far fa-sticky-note
Note kind
Policy level
Specification keywords
UML keywords
Keywords
Click on the image to view it full size

In some cases the final Type must be set correctly on the Expression Editor in order to see a result displayed on a table column, even if you can see results fine in Evaluation Mode.

[Under the hood there is some translation going on required to display the results in table columns. If you want to see the gory details, try a Groovy script directly in the Expression Editor and interrogate in Evaluation Mode mode with the Java .class of each stage; you'll see that there are MagicDraw specific and ECore wrapper classes used.]

In the example shown, a (not so pretty) Groovy script was used to convert the text 'Id' to an Integer 'Id' (for use in an Excel export):

arg1.getOwnedElement()[1].getValue()[0].toInteger()

In Evaluation Mode against a test Requirement the integer id could be seen fine. But with the Type left open as it did not display on the column. Setting the Type to the explicit UML Integer primitive was required to make it display in the column.

[ASIDE: The reason for the "ugly" script code was to explore step-by-step the underlying Java classes used, there are nicer ways to access the Requirement 'id']
Relates to
Related notes
Related notes (backlinks)
Related snippets (extracts)
Visit also
Visit also (backlinks)