Parameter.Value operator


Returns or sets the parameter value. The type of the value depends on the Parameter.ValueType, for example it may be a string, double, integer, GridData or boolean.

In the case of an animated Parameter it returns the value at the frame that the Parameter object was created.

If the parameter is unable to retrieve the value, it returns an Empty variant. If the parameter value is a string and it has not been set then it returns an empty string.

Tip: To set the value of a parameter inside a CustomOperator use OutputPort.Value instead.

Note: Since Python does not support input parameters on properties, this property will fail in Python. Use the Python-compliant Parameter.GetValue2 or Parameter.PutValue2 method instead.

C# Syntax

// get accessor
Object Parameter.get_Value( Object inFrame );
// set accessor
Parameter.set_Value( Object inFrame, Object pVal );


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


1. VBScript Example

'       This example demonstrates how to get and set the visibility of a camera
NewScene , false
set oRoot = Application.ActiveSceneRoot
set oCam = oRoot.AddCamera( "Camera", "MyCamera" )
set l_vis = oCam.Properties( "Visibility" )
Application.LogMessage "Sphere.Visibility : " & l_vis.viewvis.Value
l_vis.viewvis.Value = False
Application.LogMessage "Sphere.Visibility : " & l_vis.viewvis.Value
' Expected results:
'INFO : Sphere.Visibility : True
'INFO : Sphere.Visibility : False

2. JScript Example

        This example demonstrates how to get and set the position in X for 
        a cube at different frames.
NewScene( null, false );
var oRoot = Application.ActiveSceneRoot;
var oCube =  oRoot.AddGeometry( "Cube", "MeshSurface", "MyCube" );
SaveKey( "MyCube.Kine.local.posx", 2.000, 2.000 );
SaveKey( "MyCube.Kine.local.posx", 14.000, 14.000 );
Application.LogMessage( "X Position at frame 14 :" + oCube.posx.Value(14.000) );
oCube.posx.Value( 14.000 ) = 25.0;
Application.LogMessage( "X Position at frame 14 :" + oCube.posx.Value(14.000) );
// Expected results:
//INFO : X Position at frame 14 :14
//INFO : X Position at frame 14 :25

See Also

Parameter.Capabilities siCapabilities Parameter.ReadOnly Parameter.GetValue2 Parameter.PutValue2