## ReplaceICECompoundNode

### Introduced

v7.0

### Description

Replaces the specified ICECompoundNode using another version of the file.

### Scripting Syntax

    ReplaceICECompoundNode( [InputObjs], [Version] );

### Parameters

Parameter | Type | Description
--- | --- | ---
InputObjs | SelectionList or Selection | Compound you want to replace Default Value: If no argument is specified, the current selection is used.
Version | String | Target version you want to apply instead of the current one Default Value: If no argument is specified, the latest version of compound is used.

### Examples

#### JScript Example

    /*
            This example demonstrates how to use the ReplaceICECompoundNode command by
            creating and exporting a new ICE compound. The next time Softimage launches you
            can run the second part of the code (commented at the end)
    */
    NewScene( "", false );
    CreatePrim( "Cone", "MeshSurface" );
    ApplyOp( "ICETree", "cone", siNode, siPersistentOperation, null, siConstructionModeModeling );
    AddICECompoundNode( "Set Data", "cone.polymsh.ICETree" );
    SetValue( "cone.polymsh.ICETree.Set_Data.Reference", "Self.PointPosition" );
    AddPortToICENode( "cone.polymsh.ICETree.Set_Data.Value", siNodePortDataInsertionLocationAfter  );
    SetValue( "cone.polymsh.ICETree.Set_Data.Reference1", "Self.PointVelocity" );
    AddPortToICENode( "cone.polymsh.ICETree.Set_Data.Value1", siNodePortDataInsertionLocationAfter  );
    SetValue( "cone.polymsh.ICETree.Set_Data.Reference2", "Self.Color" );
    // Create a compound node and export it to disk
    CreateICECompoundNode( "cone.polymsh.ICETree.Set_Data" );
    EditICECompoundProperties( "cone.polymsh.ICETree.CompoundNode", "PointValues", "Data Access", "",
            "Softimage", "", "", 1, 0, "", 4, 12228200 );
    AddExposedParamToICECompoundNode( "cone.polymsh.ICETree.PointValues.Set_Data.Value",
            "cone.polymsh.ICETree.PointValues" );
    AddExposedParamToICECompoundNode( "cone.polymsh.ICETree.PointValues.Set_Data.Value1",
            "cone.polymsh.ICETree.PointValues" );
    AddExposedParamToICECompoundNode( "cone.polymsh.ICETree.PointValues.Set_Data.Value2",
            "cone.polymsh.ICETree.PointValues" );
    EditExposedParamInICECompoundNode( "cone.polymsh.ICETree.PointValues.Value",
            "PointPosition", "", "", "", "", 0 );
    EditExposedParamInICECompoundNode( "cone.polymsh.ICETree.PointValues.Value1",
            "PointVelocity", "", "", "", "", 0 );
    EditExposedParamInICECompoundNode( "cone.polymsh.ICETree.PointValues.Value2",
            "Color", "", "", "", "", 0 );
    ExportICECompoundNode( "cone.polymsh.ICETree.PointValues" );
    // Tweak the compound node a little and re-export it to disk
    AddPortToICENode( "cone.polymsh.ICETree.PointValues.Set_Data.Value2",
            siNodePortDataInsertionLocationAfter );
    SetValue( "cone.polymsh.ICETree.PointValues.Set_Data.Reference3", "Self.mass" );
    AddExposedParamToICECompoundNode( "cone.polymsh.ICETree.PointValues.Set_Data.Value3",
            "cone.polymsh.ICETree.PointValues" );
    EditExposedParamInICECompoundNode( "cone.polymsh.ICETree.PointValues.Value3",
            "Mass", "", "", "", "", 0 );
    ExportICECompoundNode( "cone.polymsh.ICETree.PointValues", "", "", "PointValues", "1.1", false );
    // Close Softimage (to update the compound database), re-launch Softimage,
    // and then run the following code:
    /*
    NewScene( "", false );
    CreatePrim( "Cone", "MeshSurface" );
    ApplyOp( "ICETree", "cone", siNode, siPersistentOperation, null, siConstructionModeModeling );
    AddICECompoundNode( "PointValues", "cone.polymsh.ICETree" );
    ReplaceICECompoundNode( "cone.polymsh.ICETree.PointValues", "1.0" );
    */

### See Also

AddICECompoundNode EditExposedParamInICECompoundNode EditICECompoundPPGLogic EditICECompoundProperties ExportICECompoundNode GetICECompoundPortProperties GetICECompoundProperties ICECompoundNode.Major ICECompoundNode.Minor