Parameter.ValueType operator

Description

Returns the data type (siVariantType) of the parameter's value. For example, a check-box parameter would return siBool and a text-based parameter would return siString (see siVariantType for more information on possible values for parameters).

Note: This is different from the SIObject.Type property, which refers to the type of the Parameter object (which returns "Parameter").

Examples

VBScript Example

'
' This example demonstrates the different between Type, ValueType and TypeName().
' Both a custom parameter and the position of an object are parameter objects
' so they have the same Type. However because one is an integer value and the 
' other a double, they have different ValueTypes
'
NewScene , false
set oRoot = Application.ActiveProject.ActiveScene.Root
set oPropSet = oRoot.AddProperty( "Custom_parameter_list", , "Test" )   
set oProp = oPropSet.AddParameter( "Var1", siInt4, , , , , , 1, 0, 10 )
Application.LogMessage oProp.Type & " " & TypeName( oProp ) & " " _
                                & oProp.ValueType & " " & TypeName( oProp.Value )
set obj = GetPrim( "Null" )
set oPosX = obj.Kinematics.Global.Parameters("posx")
Application.LogMessage oPosX.Type & " " & TypeName( oPosX ) & " " _
                                & oPosX.ValueType & " " & TypeName( oPosX.Value )
'  Expected results:
' INFO : "Parameter Parameter 3 Long"
' INFO : "Parameter Parameter 5 Double"