PropertyObject.InsertSubProperty
- Updated2025-07-21
- 2 minute(s) read
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.
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
PropertyObject.DeleteSubProperty
PropertyObject.ValidateNewSubPropertyName
PropertyObjectType.ArrayDimensions
Thread Safety of the PropertyObject API and TestStand Variables