ICENodeInputPort.GetValueAtFrame
 
 
 

ICENodeInputPort.GetValueAtFrame

Description

Returns the port value as a Variant at a specific frame. The type of the value depends on ICENodePort.DataType. The value stored in this port is only accessible when the port is not connected. If the port is connected, it returns an Empty variant.

Note: This property only returns values for simple types such as float, integer and boolean. Returning other value types is not yet supported. If the port is unable to retrieve the value, it returns an Empty variant.

Tip: Values for non-supported types can be accessed with ICENodePort.Parameters.

C# Syntax

Object ICENodeInputPort.GetValueAtFrame( Object inFrame );

Scripting Syntax

oVariant = ICENodeInputPort.GetValueAtFrame( Frame );

Return Value

Variant

Parameters

Parameter Type Description
Frame Variant Frame at which to set the value.

Examples

Python Example

#
# This example demonstrates how to get a non-connected Node port value at different time
#
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")
xsi.SaveKey( "grid.polymsh.ICETree.InitDataNode.EdgeLength", 1.000, 5.000 );
xsi.SaveKey( "grid.polymsh.ICETree.InitDataNode.EdgeLength", 5.000, 25.000 );
xsi.LogMessage( "EdgeLength value at frame 1: " + str(nodeport.GetValueAtFrame(1.0)) )
nodeport.PutValueAtFrame( 5.0, 85.0 )
xsi.LogMessage( "EdgeLength value at frame 5: " + str(nodeport.GetValueAtFrame(5.0)) )
# Expected results:
# INFO : EdgeLength value at frame 1: 5.0
# INFO : EdgeLength value at frame 5: 85.0

See Also

ICENodeInputPort.PutValueAtFrame AddAttributeToSetDataICENode