この例では、ISIVTCollection を介して SetExpr コマンドから出力引数を取得する方法を示します。
/* This example sets an expression on a parameter using the SetExpr command and then accesses the new Expression object(s) via the ISIVTCollection */ // Create the object and set the expression NewScene( "", false ); var oDonut = CreatePrim( "Torus", "NurbsSurface" ); var ivtRtn = SetExpr( oDonut+"*/kine.local.pos", "RAND(1,-5,5)" ); // The new Expression object is contained inside an XSICollection // which is returned wrapped in an ISIVTCollection var xsiColl = ivtRtn("ExprObj"); try { Application.LogMessage( "'ExprObj' contains " + xsiColl.Count + " expression(s)" ); } catch(e) { Application.LogMessage( "Could not find 'ExprObj'" ); } // Output: // INFO : 'ExprObj' contains 3 expression(s)