PropertyObject.InsertSubProperty

Syntax

PropertyObject.InsertSubProperty( lookupString, options, index, subProperty)

Purpose

Inserts an existing property object as a subproperty of another property object.

Remarks

To insert a new array element in one-dimensional arrays at the specified offset, use the Set_ByOffset methods of the PropertyObject class and specify the PropOption_InsertElement flag. Use the PropertyObjectType.ArrayDimensions property to change the size of multi-dimensional array objects.

Note 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.ValidateNewSubPropertyName method 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

lookupString As String

[In] Pass an empty string to denote the PropertyObject to which the method applies, or pass the name of a subproperty within the PropertyObject. You can also pass lookup strings to this parameter.

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.

index As Long

[In] Specifies the index at which to insert the subproperty. This value must be greater than or equal to 0 and less than or equal to the number of subproperties.

subProperty As PropertyObject

[In] Specifies the object to insert as a subproperty. This object must not be a subproperty of another object. Use the PropertyObject.Parent property to determine whether an object is already a subproperty.

See Also

Engine.NewPropertyObject

Lookup Strings

PropertyObject

PropertyObject.DeleteSubProperty

PropertyObject.NewSubProperty

PropertyObject.Parent

PropertyObject.ValidateNewSubPropertyName

PropertyObjectType.ArrayDimensions

PropertyOptions

Thread Safety of the PropertyObject API and TestStand Variables