Integrations (PTC products, 3rd party products and code) > Code integration (Ada, ARINC 653, C, C#, C++, IDL, Java, SQL and VB) > IDL Code > IDL items (reference information) > Component item (IDL code)
  
Component item (IDL code)
Create a Component in the following ways:
On a Component Definition Diagram: on the diagram's toolbar, click the Component button, and then click in free space.
Right-click the Model or a Package, point to New, point to IDL Profile, and then click Component.
A Component can own Component Parts, Clients, Services, Extended Port (Publishers) and Extended Port (Consumers); which can be created through an Internal Component Diagram, or through the context menu of a Component.
Important: When a Component owns a Component Part, the Component becomes an assembly and ACS does not generate an IDL file for that Component.
You can define Component inheritance on a Component Definition Diagram.
A Component can also own Attributes, which can be created by right-clicking a Component, pointing to New, and then clicking IDLAttribute. On a diagram, a Component's Attributes are shown by default in the Attributes compartment. You can show or hide this compartment by right-clicking the Component, pointing to Toggle Compartments, and then clicking Attributes.
You can optionally apply the «Source» stereotype from the IDL profile to the Component:
To specify a non-default name for the generated IDL file: on the Source tab of the Component's Property Pages set the tagged value of the File Name tag definition to the name of the file you want to create, including the file name extension.
To specify includes text for the generated IDL file: on the Source tab of the Component's Property Pages set the tagged value of the Includes tag definition to the includes text you want to generate.
To make ACS ignore the Component: on the Source tab of the Component's Property Pages set the tagged value of the Ignore tag definition to TRUE.
When you can right-click a Component, and then click Synchronize IDL Element Names, the command is run against each of the Component's Extended Ports, Connector Instances, Clients and Services. For more information, see Client item (IDL code), Connector Instance Item (IDL code), Extended port (consumer) item (IDL code), Extended port (publisher) item (IDL code)
When shown on an Internal Component Diagram, a Component's notation is as follows.
Note that on a Component Definition Diagram or Internal Component Diagram, a Component's view options are set through the Class entry.
To add an existing component to a Component Definition Diagram, drag the Component from an appropriate pane to free space on the diagram.
On a Component Definition Diagram, you can populate a Component's child items through the Populate commands - right-click the Component, point to Populate, and then click the appropriate command:
Populate Component Parts through the Part related commands.
Populate Clients, Services, Extended Port (Publishers) and Extended Port (Consumers) through the Port related commands.
All Components are shown in the IDL Elements pane - expand the Component folder.
A Component is based on a UML Class.
The following sections provide information about how a Component is used in the model.
Owned By
Model (UML item)
Package (UML item)
Owns
Attribute (IDL item)
Client
Component Part
Extended Port (Consumer)
Extended Port (Publisher)
Generalization (UML item)
Sequence Diagram (IDL)
Service
Shown on these diagrams
Component Definition Diagram
IDL Profile properties
attributes - derived property that lists the Component's Attributes.
clientPorts - derived property that lists the Component's Clients.
consumerPorts - this property is not used at present.
extendedConsumerPorts - derived property that lists the Component's Extended Port (Consumers).
extendedPublisherPorts - derived property that lists the Component's Extended Port (Publishers).
isAssembly - derived property that shows whether the Component is an assembly: TRUE means the Component has Component Parts; FALSE means the Component does not have any Component Parts.
parts - derived property that lists the Component's Component Parts.
publisherPorts - this property is not used at present.
servicePorts - derived property that lists the Component's Services.