Adds an InputPort to the custom operator. This method makes it possible to define a connection to a custom operator by specifying the type of object it needs to connect to, rather than providing an existing object.

This is for use in advanced operators, where the port may be optional and dynamically connected after the operator is instantiated. Each port defined in this way must be in its own PortGroup so that the connection can be established through Operator.ConnectToGroup.

For example, if an operator supports an optional connection to a ClusterProperty, the CustomOperator.AddInputPort method forces the existence of a ClusterProperty at the time of the operator definition, even if the operator is not meant to connect to a ClusterProperty until some later time. This method avoids the need for any ClusterProperty to actually exist in the scene.

C# Syntax

InputPort CustomOperator.AddInputPortByClassID( siClassID in_TargetClassID, String in_PortName, Int32 in_portgroup, Int32 in_flags );

Scripting Syntax

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

Return Value

The newly created InputPort


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 "In" + the Parameter.ScriptName of the object being connected, for example "Inposx".

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.AddInputPort CustomOperator.AddOutputPortByClassID Operator.ConnectToGroup