Port.Index
 
 
 

Port.Index operator

Introduced

v3.0

Description

Returns the port index of this port as a Long within its port group or -1 if there is a failure.

Note: This property refers to the index of the port within the port group and is different from the index used to access the InputPortCollection or OutputPortCollection (available through the Operator.InputPorts and Operator.OutputPorts). This index is rarely a concern when implementing Self-Installed Custom Operators, because OperatorContext.GetInputValue is based on the InputPortCollection index and normally there is only a single output port (see OperatorContext.OutputPort).

Note: When the Port is an output port, returned from a call to CustomOperator.AddOutputPort, this index may change if any input ports are added afterwards.

C# Syntax

// get accessor
Int32 rtn = Port.Index;