ICENodeInputPort.Value

説明

現在の時間フレームでポート値をVariantとして戻したり、設定したりします。ICENodePort.DataTypeに応じた値のタイプ。このポートに格納された値には、ポートが接続されている場合にのみアクセスできます。ポートが接続されている場合は、空のバリアントを戻します。

注:このプロパティは、浮動小数、整数、ブールなどのシンプルなタイプの値のみを戻します。現時点では、他の戻り値のタイプはサポートされていません。ポートが値を取得できない場合には空のバリアントを戻します。

ヒント:サポートされていないタイプの値には、ICENodePort.Parametersを使用してアクセスできます。

Python の例

#
# This example demonstrates how to get and set a port value on an InitData node
#
import win32com.client
from win32com.client import constants
xsi = Application
xsi.NewScene("", 0)
xsi.CreatePrim("Grid", "MeshSurface", "", "")
xsi.ApplyOp("ICETree", "grid", "siNode", "siPersistentOperation", "", 0)
xsi.AddICENode("InitializeNode", "grid.polymsh.ICETree")
xsi.SetValue("grid.polymsh.ICETree.InitDataNode.PredefinedAttributeName", "EdgeLength", "")
xsi.AddAttributeToSetDataICENode("grid.polymsh.ICETree.InitDataNode", "EdgeLength", constants.siComponentDataTypeFloat, constants.siComponentDataContextComponent1D, constants.siComponentDataStructureSingle )
xsi.SelectObj("grid.polymsh.ICETree.InitDataNode", "", "")
initDataNode = xsi.Selection(0)
nodeport = initDataNode.InputPorts("EdgeLength")
nodeport.Value = 5.0
xsi.LogMessage( "EdgeLength value: " + str(nodeport.Value) )
# Expected results:
# INFO : EdgeLength value: 5.0

関連項目

ICENodeInputPort.PutValueAtFrame ICENodeInputPort.GetValueAtFrame AddAttributeToSetDataICENode