|Download Help (Windows Only)|
PropertyObject.NewSubProperty ( lookupString, ValueType, asArray, typeNameParam, options)
Creates a new subproperty with the name the lookupString parameter specifies.
|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.|
|Note TestStand does not support adding a new subproperty to an instance of a type unless you add the subproperty below a container you have marked as unstructured in the type definition by using the PropFlags_UnstructuredProperty flag. TestStand does not report any errors and creates the property, but does not save the property. When resolving type conflicts and updating type instances, TestStand automatically removes the property.|
lookupString As String
[In] Pass the lookup string for the new subproperty to create. If you pass a lookup string with multiple levels (such as "x.y.z"), this method creates all the necessary intermediate container objects. Refer to lookup string for more information about the strings you can use.
ValueType As PropertyValueTypes
[In] Specifies the type of value you want the new subproperty to store.
asArray As Boolean
[In] Pass True to make the new subproperty an array with elements that are of the type you specify in the ValueType parameter.
typeNameParam As String
[In] Pass the name of an existing type if you want to create the new subproperty as an instance of a named type. Otherwise, pass an empty string. If you pass a type name, you must pass PropValType_NamedType for the ValueType 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. You do not need to pass the InsertIfMissing option to create the new subproperty. Pass DoNothingIfExists if you want the method to not report an error if the subproperty already exists.