To color ports by their type


  1. Create a Legend and a legend item.
  2. Open the Specification window of a Legend Item.
  3. Click the specification cell of the Adornment property, and then click .
  4. In the Adornment Properties dialog, specify the desired adornment properties.
  5. Select the specification cell of the Elements by Condition property, and  click .
  6. Click Expert at the bottom of the dialog. The dialog is switched to the Expert mode.

  7. In the Structured Expression dialog on the left, click Create operation.
  8. Select the Metachain Navigation operation type.
  9. Click the Insert button to create the first step of the Metachain

  10. Select Port under Metaclass or Stereotype and under Property, select Type.
  11. In the Structured Expression dialog on the left, click Create operation.
  12. Select the Operation from Model operation type.
  13. Select the Contains opaque behavior from the model.

     The Apply Filter check box must be unselected!

  14. On the left side of the dialog, expand the Contains operation and drag-and-drop the previously created Metachain Navigation on the Input parameter.
  15. On the left side of the dialog, click the Obj parameter of the Contains operation.
  16. Select Element from the Values category.
  17. Click  and specify the port type to verify.