PropertyObject.Write

Syntax

PropertyObject.Write( pathString, objectName, RWoptions)

Purpose

Writes the contents of an object to the file the pathString parameter specifies and associates the name the objectName parameter specifies with the object in the file.

Remarks

If you call this method on an alias object , TestStand generates the stream using the object to which the alias refers. This method does not include alias subproperty objects in the stream.

Note Setting and obtaining values of PropertyObjects objects, the subproperties of PropertyObject objects, and the parent properties of PropertyObject objects is thread-safe and returns consistent values as long as no structural changes to the parent-child relationship of the property objects occur. Making structural changes to a PropertyObject data structure while another thread accesses or modifies the object is not safe and can lead to unexpected behavior and crashes. If you need to share a PropertyObject data structure between threads and need to be able to modify the structure while you share the object, you must use a TestStand Lock step or step setting, an critical section, or other synchronization primitives to ensure that no other threads access the PropertyObject while another thread modifies the structure of the object.

Parameters

pathString As String

[In] Specifies the pathname of the file to which to write the object data.

objectName As String

[In] Specifies the name to associate with the object.

RWoptions As Long

[In] Pass 0 to specify the default behavior or pass one or more ReadWriteOptions constants. Use the bitwise-OR operator to specify multiple read/write options.

If you have already written an object with the specified name to the file, pass the RWOption_EraseExistingObject constant for this parameter. Otherwise, the values stored in the file do not update to the values of the object you are writing if the object you are writing has default values for some of its properties. Additionally, unless you use the RWOption_EraseExistingObject or RWOption_EraseAll constants, the method leaves properties from previously written versions of the object in the file even if the properties do not exist in the current version of the object being written.

See Also

PropertyObject.GetXML

PropertyObject.IsAliasObject

PropertyObject.ReadEx

PropertyObject.Serialize

ReadWriteOptions