You can create an arbitrary number of input and output ports. To create ports either use the appropriate tool buttons Add Input Port and Add Output Port, or use the shortcuts I for input port and O for output port. Alternatively click Edit on the main menu bar and select the appropriate options.
For this example we need two input ports and one output port:
Your pointer has switched to a different mode. Every time you click in the gray rectangle of your primitive in the Model Editor window which represents the bounding box of your model, a port will be generated.
Another method to create new ports is to press [ctrl] and then click on an existing port you wish to copy. You can now drag and drop the port you wish to duplicate.
When using the context menu option Add Input/Output Port your mouse pointer will not change and one new port will be placed in the Model Editor window. The Edit menu works in the same way as the context menu.
Your primitive should now look like this:
We now need to change the properties of each port.
We now need to add a parameter to the primitive. A parameter is used as a fixed value to change the behavior of the primitive without recompiling it.
Before adding functionality to the primitive, save it by clicking on the Save button in the toolbar.