A port is a connection point through which a part definition makes some of its features available in a limited way. A port definition defines features that can be made available via ports. Two ports are compatible for connection if they have directed features that match with inverse directions, which can be established using port conjugation. 

Creating port usage and definition elements

Creating port usage and definition elements via the Textual Editor

To create port usage and definition elements via the Textual Editor


  1. In the Textual Editor, place the cursor where you want to create the element and declare the keyword:
    1.  port def for a port definition.

    2.  port for a port usage.
  2. Specify the element name.
  3. (Optional) Specify the port features in the element body.
  4. Click the Synchronize button.

port def OnOffCmdPort { out onOffCmd : OnOffCmd; }
port onOffCmdPort : OnOffCmdPort;

Creating port usage and definition elements via the Create Element command

To create port usage and definition elements via the Create Element command


  1. In the Containment tree, right-click an element, and in the shortcut menu, click Create Element.

  2. In the Create Element dialog, select one of the following:
    1. port for port usage.
    2. port def for port definition.
  3. Name the element.
  4. (Optional) Specify the port's features.

Creating port usage and definition elements via the view palette

To create port usage and definition elements via the view palette


  • To create an interface definition:
    1. In the view palette, under the Items/Ports/Attributes group, click the port def button to create an interface definition element.
    2. Click in the view pane where you want to create the port definition symbol.
  • To create an interface usage:
    1. In the view palette, under the Items/Ports/Attributes group, click the port button to create an interface usage.
    2. In a view, click on an element symbol for which you want to create a port.

      If the needed button is not displayed, click the down-facing arrow next to either the port or the port def button and select the needed button in the dropdown menu.

Creating port usage elements via the smart manipulator in a view

To create port usage elements via the smart manipulator in a view


  • In a view, select an element symbol, and in its smart manipulator, click the port command. A port is created for the element.

Creating port usage elements via the symbol compartment in a view

For more information see the Compartments page.

To create port usage elements via the symbol compartment in a view 


  • Do one of the following:
    • Select an element symbol and click the Create Element button on it. In the dropdown menu, click the port element.
    • Select an element symbol and on the right side of the ports compartment, click the Create port button.
      The new element is created and displayed in the ports compartment.

Creating port usage elements via the Specification panel

To create port usage elements via the Specification panel


  1. Open the Specification panel.
  2. Do one of the following:
    1. In the Properties section bar, click the Create Element button. The shortcut menu appears. Click the port element in the shortcut menu.
    2. In the ports compartment section's bar, click the Create port button.
      The element is created in the ports compartment.

Auto-creating port definition elements via the Extract Definition command

To auto-create a port definition element via the Extract Definition command


Conjugating ports

Every port definition has an implicit conjugate port definition that reverses input and output features. You can easily use the conjugate port definitions by prepending the ~ symbol to the port definition name. 

Using conjugated ports definitions via the Textual Editor

To use conjugate port definitions via the Textual Editor


  1. In the Textual Editor, place the cursor where you want the element to be created and declare the port keyword.
  2. (Optional) Follow with the port name.
  3. Follow with the feature typing relationship.
  4. Specify the conjugated port definition:
    1. Full conjugation notation: 
      1. Port definition name followed by :: (qualified name notation), followed by the port definition name with the ~ symbol prepended.
    2. Shorthand notation:
      1. Port definition name with the ~ symbol prepended.
  5. Click the Synchronize button.

port def FuelPort {                                                         // Port definition
    attribute temperature : Temp;
    out item fuelSupply : Fuel;
    in item fuelReturn : Fuel;
}
part def FuelTankAssembly {
    port fuelTankPort : FuelPort;
}
part def Engine {
    port engineFuelPortFuelPort::'~FuelPort';              // Conjugate port definition

    port engineFuelPort : ~FuelPort;                               // Using a ~ symbol on the port type is a shorthand for using the conjugate port definition
}

Directed port features

A feature with a direction (in, out or inout) is a directed feature. Two ports are compatible for connection if they have directed features that match with inverse directions.

Creating directed port features

To create directed port features


  1. In the Textual Editor, prepend the direction keyword - in, out, inout - to the feature.
  2. Click the Synchronize button.

    port def FuelOutPort {
        attribute temperature : Temp;
        out item fuelSupply : Fuel;           // feature fuelSupply with direction out
        in item fuelReturn : Fuel;              // feature fuelReturn with compatible direction in
    }
    port def FuelInPort {
        attribute temperature : Temp;
        in item fuelSupply : Fuel;             // feature fuelSupply with compatible direction in
        out item fuelReturn : Fuel;           // feature fuelReturn with compatible direction out
    }