CustomOperator.AddOutputPortByClassID

Introduced

v5.1

Description

Adds an OutputPort to the custom operator. This method makes it possible to define a connection to a custom operator by specifying the type of object it will connect to, rather than providing an actual existing object as is the case in CustomOperator.AddOutputPort. This is for use in advanced operators, where the port may be optional and dynamically connected after the operator is instantiated.

Note: Use of this method is rarely necessary because an operator must connect to at least one output at the time of creation, and normally only has only one output.

Scripting Syntax

oReturn = CustomOperator.AddOutputPortByClassID( TargetClassID, [PortName], [PortGroup], [Flags] );

Return Value

The newly created OutputPort

Parameters

Parameter Type Description
TargetClassID siClassID Type of object that can connect to this object, for example siKinematicStateID, siClusterPropertyID, siParameterID or siPrimitiveID.
PortName String Name of the port

Default Value: The default name is "Out" + the Parameter.ScriptName of the object being connected, for example "Outposx".

PortGroup Long Index of the port group.

Default Value: -1

Flags Long Mask of port group flags described by siPortFlags.

Default Value: 0

See Also

CustomOperator.AddOutputPort CustomOperator.AddInputPortByClassID Operator.ConnectToGroup