この例では、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