この例では、AddProp コマンドを使用して、Python で ISIVTCollection を使用する方法を示します。 AddProp コマンドは戻り値を持たず、PropertyName および Value という 2 つの出力引数を使用します。これらの出力引数は、戻り値の形で ISIVTCollection オブジェクトとして戻されます。
Application.SelectObj( "Scene_Root" )
rtn = Application.AddProp("Custom_parameter_list", "", "", "MyPSet", "")
# The second return value is the XSICollection of the newly created
# properties (in this case 1)
for i in range(rtn(1).Count):
o = rtn(1)(i)
Application.LogMessage(o.FullName)
# You can also retrieve the output arguments by name
o = rtn( "Value" )(0)
Application.LogMessage(o.FullName)
# Output:
#INFO : MyPSet
#INFO : MyPSet