## ConnectICENodes

### Introduced

v7.0

### Description

Connects two nodes through the specified ports (components).

### Scripting Syntax

    ConnectICENodes( [InputPort], [OutputPort] );

### Parameters

Parameter | Type | Description
--- | --- | ---
InputPort | String | Input port on the target node (ICENodeInputPort). Default Value: If not specified, the user is prompted to select a target.
OutputPort | String | Output port on the source node (ICENodeOutputPort). Default Value: If not specified, the user is prompted to select a source.

### Examples

#### Python Example

    #"""
    #Sample to demonstrate how to connect ICE nodes with ConnectICENode.
    #"""
    Application.NewScene("", "")
    Application.CreatePrim("Cube", "MeshSurface", "", "")
    Application.ApplyOp("ICETree", "cube", "siNode", "", "", 0)
    Application.AddICENode("$XSI_DSPRESETS\\ICENodes\\GetDataNode.Preset", "cube.polymsh.ICETree")
    Application.SetValue("cube.polymsh.ICETree.SceneReferenceNode.reference", "self.pointposition", "")
    Application.AddICECompoundNode("Set Data", "cube.polymsh.ICETree")
    Application.SetValue("cube.polymsh.ICETree.Set_Data.Reference", "self.pointposition", "")
    Application.AddICENode("$XSI_DSPRESETS\\ICENodes\\MultiplyByScalarNode.Preset", "cube.polymsh.ICETree")
    Application.SetValue("cube.polymsh.ICETree.MultiplyByScalarNode.factor", 2, "")
    Application.ConnectICENodes("cube.polymsh.ICETree.MultiplyByScalarNode.value", "cube.polymsh.ICETree.SceneReferenceNode.value")
    Application.ConnectICENodes("cube.polymsh.ICETree.Set_Data.Value", "cube.polymsh.ICETree.MultiplyByScalarNode.result")
    # Use the port indices to connect the last nodes.
    tree = Application.Dictionary.GetObject("cube.polymsh.ICETree")
    setData = Application.Dictionary.GetObject("cube.polymsh.ICETree.Set_Data")
    Application.ConnectICENodes(tree.InputPorts(0), setData.OutputPorts(0))

### See Also

AddAttributeToSetDataICENode AddICECompoundNode AddExposedParamToICECompoundNode AddICENode AddNodeToICECompoundNode CleanDisconnectedICENodes CreateICECompoundNode DisconnectICENodePort EditExposedParamInICECompoundNode EditICECompoundPPGLogic EditICECompoundProperties ExplodeICECompoundNode GetICECompoundPortProperties GetICECompoundProperties RemoveAttributeFromSetDataICENode RemoveExposedParamFromICECompoundNode RemoveNodeFromICECompoundNode