SysML, UAF, UML, and UPDM Profiles > SysML profile > Blocks > Internal block diagrams > Creating a custom simple table based on full ports
Creating a custom simple table based on full ports
This topic explains how to create a custom simple table based on full ports (with an example).
For the example, we use the following Internal Block Diagram to create the custom simple table:
To create a custom simple table
1. Create the reference Tag Definition that returns the items to include in the table, and apply the derived reference Tag Definition to the Custom Table through a Stereotype.
a. Create a Stereotype (named My Stereotype).
On the Properties pane, in the Items tab, link Model Item Types to Text Diagram.
b. Create a Tag Definition (named My Tag Definition).
In the Properties pane, Type tab:
Set Data Type to Reference.
Select Derived.
Link Model Item Types to Role and Attribute.
In the Properties pane, Derivation Script tab, add the following script:
Set oSTRD = <>
Set oItems = oSTRD.Items("All Required Items")
For Each oItem in oItems
If (oItem("Dynamic Class Name") = "FullPort") Then
Script.AddResultObject(oItem)
End If
Next
Drag the intended IBD from the Packages pane to the just before the <> in the script and remove the <> characters
On the Properties pane, in the Items tab, link Stereotypes to My Stereotype.
On the Properties pane, in the Usage tab, click Publish.
2. Create Custom Simple Table (named MyIBD FullPorts).
On the Properties pane, in the Items tab, link Stereotypes to My Stereotype.
3. Open the Custom Table’s property pages.
4. Click the CustomSimpleTable tab.
5. Set the tagged value of the rowItemsStartPoint tag definition to Table/Matrix.
6. Set the tagged value of the rowItemsRole tag definition to the name of the reference Tag Definition (My Tag Definition).
7. Set the tagged value of the showItemScoping tag definition to FALSE.
8. Ensure that the reference Tag Definition returns at least one item that can be included in the Custom Table (check the Properties pane, My Stereotype tab to see that at least one item is listed in the tag definitions value).
9. Right-click the Custom Table, and select Set > Column Definitions.
Select Name and Scoped Name for columns.
Performing the above steps results in the following table: