vcConnector
vcConnector allows you to establish connections between behaviors in order to transfer components. For example, flow type behaviors may have any number of connections (ports/connectors) to manage the receiving and sending of components.
Properties
Name | Type | Access | Description |
Behaviour | vcBehaviour | R | Gets the behavior that the connector is connected to in a component.
If no connection, the value is None. |
CapacityTest | Enumeration | RW | Define the mode for testing capacity before transferring a component to an outgoing connection.
See Connector Constants for more information. |
Connection | vcConnector | RW | Defines connector that the connector is connected to in a component.
If no connection, the value is None. |
Index | Integer | R | Gets the position of the connector in its behavior's list of connectors. |
Name | String | RW | Defines the name of connector. |
Type | Enumeration | RW | Defines the connector's type. That is, whether the connector is an Input, Output or Input/Output type port.
See Connector Constants for more information. |
Methods
Name | Return Type | Parameters | Description |
connect | None | [vcConnector connector] | Connects the connector to a given connector.
If no argument is given, this method will remove all connections of the connector. |
testCapacity | Boolean | None | Tests the capacity of connector's behavior.
Returns True if not at capacity; otherwise returns False if at full capacity. If the behavior of a connector does not have physical capacity, for example Component Flow Proxy, returns None. |
testConnectedCapacity | Boolean | None | Tests the capacity of behavior connected to the connector.
Returns True if not at capacity; otherwise returns False if at full capacity. If the behavior of a connector does not have physical capacity, for example Component Flow Proxy, returns None. |
Examples
Example. Access and connect the connectors of paths
def OnRun(): comp = getComponent() path1 = comp.findBehaviour('InPath') path2 = comp.findBehaviour('OutPath') #option 1: access connector outConnector = path1.getConnector('Output') #option 2: access connector inConnector = path2.Connectors[0] outConnector.connect( inConnector ) |