Engine.NewPropertyObject

Syntax

Engine.NewPropertyObject( ValueType, asArray, typeNameParam, options)

Return Value

PropertyObject

Purpose

Creates and returns a new PropertyObject object.

Remarks

TestStand does not validate property names you create programmatically for invalid characters, such as spaces, which can result in errors when you use expressions. Use the PropertyObject.ValidateNewName , PropertyObject.ValidateNewSubPropertyName , or PropertyObject.ValidateNewElementName methods to validate property names. TestStand expressions require PropertyObject names to be strings that contain only letters, numbers, and underscores. PropertyObject names cannot contain spaces, start with a number, or be empty.

Additionally, the PropertyObject name cannot be Value , and you cannot have duplicate subproperty names.

For example, MyVariableName_2000 is a valid PropertyObject name.

Names of elements in a PropertyObject array can contain any character. Both sequence names and step names are examples of such named array elements. However, sequence names cannot be empty or contain control characters. You cannot have duplicate sequence names. The name NI is reserved at the root level for attributes.

Parameters

ValueType As PropertyValueTypes

[In] Specifies the type of value you want the property to contain.

asArray As Boolean

[In] Pass True if you want the property value to be an array.

typeNameParam As String

[In] If you pass PropValType_NamedType for the ValueType parameter, pass the name of the type for this parameter. Otherwise, pass an empty string. If you pass a type name, the type must already be in memory. Refer to NamedPropertyTypes for a list of built-in name types.

options As Long

[In] Pass 0 to specify the default behavior, or pass one or more PropertyOptions constants. Use the bitwise-OR operator to specify multiple options.

See Also

NamedPropertyTypes

PropertyObject

PropertyObject.ValidateNewElementName

PropertyObject.ValidateNewName

PropertyObject.ValidateNewSubPropertyName

PropertyOptions

PropertyValueTypes