PropertyOptions Constants

TestStand 2019 Help

Edition Date: May 2019

Part Number: 370052AA-01

»View Product Info
Download Help (Windows Only)

These constants represent the options you can use with many of the methods of the PropertyObject class. Use the bitwise-OR operator to specify more than one option for a particular method.

  • PropOption_CaseInsensitive–(Value: 0x1000) Use with the PropertyObject.IsEqualTo method to ignore the case of string property values when comparing.
  • PropOption_Coerce–(Value: 0x301F8) Use this option to convert the value of a property from or to any of the supported basic types. This is the combination of the PropOption_CoerceFromNumber, PropOption_CoerceFromString, PropOption_CoerceFromBoolean, PropOption_CoerceFromReference, PropOption_CoerceToNumber, PropOption_CoerceToString, PropOption_CoerceToBoolean, and PropOption_CoerceToReference flags.
  • PropOption_CoerceBadNumbersToZero–(Value: 0x40000) Use this option to attempt to coerce a non-numeric string to a number that yields zero instead of an error.
  • PropOption_CoerceFromBoolean–(Value: 0x20) Use this option for implicit conversion when using a Boolean value as a string or number. You can use this option with the PropertyObject.GetValNumber and PropertyObject.GetValString methods.
  • PropOption_CoerceFromEnum–(Value: 0xC0) Use this option for implicit conversion when using an enumeration value as a string or number. You can use this option with the PropertyObject.GetValNumber and PropertyObject.GetValString methods.
  • PropOption_CoerceFromNumber–(Value: 0x8) Use this option for implicit conversion when using a numeric value as a Boolean or string. You can use this option with the PropertyObject.GetValBoolean and PropertyObject.GetValString methods. When you use this option with the PropertyObject.GetValString method, you can pass one of the PropOption_DecimalPoint options to specify the decimal point character. You can also use this option with the PropertyObject.GetValNumber, PropertyObject.GetValInteger64, and PropertyObject.GetValUnsignedInteger64 methods to convert the returned number to the required representation. Pass this option to the PropertyObject.GetValString of an enumeration object to get the numerical value of the enumeration converted to a string when enumerator information is unavailable.
  • PropOption_CoerceFromReference–(Value: 0x10000) Use this option for implicit conversion when using an ActiveX reference value as a string or number. You can use this option with the PropertyObject.GetValNumber and PropertyObject.GetValString methods.
  • PropOption_CoerceFromString–(Value: 0x10) Use this option for implicit conversion when using a string value as a Boolean or number. You can use this option with the PropertyObject.GetValNumber and PropertyObject.GetValBoolean methods.
  • PropOption_CoerceToBoolean–(Value: 0x100) Use this option for implicit conversion when setting a Boolean value with a string or number. You can use this option with the PropertyObject.SetValNumber and PropertyObject.SetValString methods. TestStand ignores this flag when you specify PropOption_InsertIfMissing and the property does not exist.
  • PropOption_CoerceToEnum–(Value: 0x18) Use this option for implicit conversion when setting an enumeration value with a string or number. You can use this option with the PropertyObject.SetValNumber and PropertyObject.SetValString methods. TestStand ignores this flag when you specify PropOption_InsertIfMissing and the property does not exist.
  • PropOption_CoerceToNumber–(Value: 0x40) Use this option for implicit conversion when setting a numeric value with a Boolean or string. You can use this option with the PropertyObject.SetValBoolean and PropertyObject.SetValString methods. TestStand ignores this flag when you specify PropOption_InsertIfMissing and the property does not exist. You can also use this option with the PropertyObject.SetValNumber, PropertyObject.SetValInteger64, and PropertyObject.SetValUnsignedInteger64 methods to convert the new value to the required representation.
  • PropOption_CoerceToReference–(Value: 0x20000) Use this option for implicit conversion when setting an ActiveX reference value with a string or number. You can use this option with the PropertyObject.SetValNumber and PropertyObject.SetValString methods. TestStand ignores this flag when you specify PropOption_InsertIfMissing and the property does not exist.
  • PropOption_CoerceToString–(Value: 0x80) Use this option for implicit conversion when setting a string value with a Boolean or number. You can use this option with the PropertyObject.SetValNumber and PropertyObject.SetValBoolean methods. TestStand ignores this flag when you specify PropOption_InsertIfMissing and the property does not exist.
  • PropOption_CopyAllFlags–(Value: 0x20000000) Use this value with the PropertyObject.Clone method to require all flags in the object and the subproperties to be copied. If you do not pass this option, the Clone function removes flags such as PropFlags_NotDeletable and PropFlags_NotEditable from the copy.
  • PropOption_DecimalPoint_UseComma–(Value: 0x3000) Use this option to specify the comma character as the decimal point when you implicitly convert a string to a number or a number to a string in a call to a GetVal or SetVal method that coerces between a number and string.
  • PropOption_DecimalPoint_UsePeriod–(Value: 0x0) Use this option to specify the period character as the decimal point when you implicitly convert a string to a number or a number to a string in a call to a GetVal or SetVal method that coerces between a number and string.
  • PropOption_DecimalPoint_UsePreference–(Value: 0x1000) Use the Localization preferences on the Localization tab of the Station Options dialog box to determine whether the operating system setting determines the decimal point character when you implicitly convert a string to a number or a number to a string in a call to a GetVal or SetVal method that coerces between a number and string.
  • PropOption_DecimalPoint_UseSystemSetting–(Value: 0x2000) Use the character that the operating system setting specifies as the decimal point when you implicitly convert a string to a number or a number to a string in a call to a GetVal or SetVal method that coerces between a number and string.
  • PropOption_DeleteIfExists–(Value: 0x2) When calling the PropertyObject.DeleteSubProperty method, use this option to avoid an error if the subproperty you specify does not exist.
  • PropOption_DoNotAdoptCurrentName–(Value: 0x800) Use this value with the PropertyObject.SetPropertyObject method to require that the object you pass to the method keeps its name. If you do not use this option, the method changes the object to have the same name as the object it is replacing.
  • PropOption_DoNothingIfExists–(Value: 0x4) Use this option with the SetVal methods of the PropertyObject class to avoid setting the value of a property that already exists. Usually, you use this option in combination with the PropOption_InsertIfMissing option.
  • PropOption_DoNotRecurse–(Value: 0x4000) Use with the PropertyObject.IsEqualTo method to compare only the top level object and not the subproperties.
  • PropOption_DoNotShareProperties–(Value: 0x8000000) Use this value with the PropertyObject.Clone method of the PropertyObject class. Normally, if a cloned object has a subproperty that has the PropFlags_Shared flag set, that subproperty is shared between the original object and the clone; that is, both objects point to the same subproperty object. This option prevents such subproperties from being shared between the original object and the clone.
  • PropOption_InsertElement–(Value: 0x1) Use this option with the SetByOffset methods of the PropertyObject class to insert a new array element at the specified offset. This option is valid only for one-dimensional arrays.
  • PropOption_InsertIfMissing–(Value: 0x1) If the property the lookupString parameter specifies does not exist, use this option with the SetVal and GetVal methods of the PropertyObject class to create a new property. The PropertyObject.SetValVariant and PropertyObject.GetValVariant methods do not support the InsertIfMissing option.

    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.
  • PropOption_NoOptions–(Value: 0x0) No options.
  • PropOption_NotOwning–(Value: 0x200) Use this option with the PropertyObject.SetPropertyObject method to create an alias to the specified property object. Use the PropertyObject.IsAliasObject method to determine whether the object is an alias.
  • PropOption_OverrideNotDeletable–(Value: 0x400000) Use with methods that delete properties to override the PropFlags_NotDeletable flag.
  • PropOption_ReferToAlias–(Value: 0x400) Use this option when calling methods on alias objects to perform operations on the alias instead of the object to which the alias refers. Use the PropertyObject.IsAliasObject method to determine whether the object is an alias.
  • PropOption_RemoveElement–(Value: 0x2) Use this value with the Get_ByOffset methods of the PropertyObject class to remove the array element at the specified offset. This option is valid only for one-dimensional arrays.
  • PropOption_RequireIdenticalStructure–(Value: 0x2000) Use with the PropertyObject.IsEqualTo method to require that both objects be identical in every way for the comparison to return True. When you use this option, the following items must also be identical for the PropertyObject.IsEqualTo method to return True:

    • Array element prototypes for arrays of containers
    • Type definitions for type instances
    • Comments
    • Numeric formats
    • Order of subproperties
  • PropOption_SetOnlyIfDoesNotExist–(Value: 0x5) This is the combination of the PropOption_DoNothingIfExists and the PropOption_InsertIfMissing options.

    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.

See Also

Localization tab

PropertyFlags

PropertyObject

PropertyObject.Clone

PropertyObject.DeleteSubProperty

PropertyObject.GetValBoolean

PropertyObject.GetValNumber

PropertyObject.GetValString

PropertyObject.GetValVariant

PropertyObject.IsAliasObject

PropertyObject.IsEqualTo

PropertyObject.IsModifiedType

PropertyObject.SetPropertyObject

PropertyObject.SetValBoolean

PropertyObject.SetValNumber

PropertyObject.SetValString

PropertyObject.SetValVariant

Station Options dialog box

WAS THIS ARTICLE HELPFUL?

Not Helpful