Integrations (PTC products, 3rd party products and code) > Code integration (Ada, ARINC 653, C, C#, C++, IDL, Java, SQL and VB) > IDL Code > Modeling IDL code in Modeler > Creating IDL Items > Creating a port type (IDL code)
  
Creating a port type (IDL code)
You can create a Port Type through a Component Definition Diagram, or from the Model or a Package.
To create a port type through a component definition diagram:
1. Open the Component Definition Diagram on which you want to create the Port Type.
2. On the diagram's toolbar, click the Port Type button.
3. On the diagram, click in free space.
4. From the Value Selector dialog, select the Port Type Kind, either Publisher or Subscriber, and then click OK.
5. Type the name of the Port Type, and then press the Enter key.
6. If you want the Port Type to inherit from another Port Type:
a. Add the Port Type you want to inherit from to the Component Definition Diagram.
b. On the diagram toolbar, click the Generalization button.
c. Click the Port Type you created, and then click the Port Type from which it is to inherit.
To create a port type from a package or the model:
1. In the Packages pane, locate the Package or Model that is to own the Port Type.
2. Right-click the Package or Model, point to New, point to IDL Profile, and then click Port Type.
3. From the Value Selector dialog, select the Port Type Kind, either Publisher or Subscriber, and then click OK.
4. Type the name of the Port Type, and then press the Enter key.