PropertyObject.UpdateEnumerators

Syntax

PropertyObject.UpdateEnumerators( newValues)

Return Value

Boolean

True if a new enumerator was added, the numeric value of an existing enumerator was changed, the value of IsStrict is changed, or the value of IsFlags is changed. False otherwise.

Purpose

Replaces the set of enumerators for an enumeration data type.

Remarks

Call this method on the root type definition of an enumeration data type to specify the set of enumerators for the type. Calling this method on a PropertyObject that is not the root type definition of an enumeration causes a runtime error. Changing the set of enumerators updates all currently loaded instances of the data type.

Parameters

newValues As PropertyObject

[In] An array of containers where each container has the following properties:

UpdateEnumeratorsElementProperty_Name ("EnumeratorName") - Enumerator Name (string)

UpdateEnumeratorsElementProperty_EnumeratorValue ("EnumeratorValue") - Enumerator Value (number)

UpdateEnumeratorsElementProperty_OldName ("OldEnumeratorName") [optional] - Prior Name, if renaming (string)

You can specify a new value for the data type's IsStrict setting by attaching a Boolean attribute to the array with a property path of "TestStand.Enum.IsStrict" .

You can specify a new value for the data type's IsFlags setting by attaching a Boolean attribute to the array with a property path of "TestStand.Enum.IsFlags" .

See Also

PropertyObject.EnumIsValid

PropertyObject.Enumerators