Engine.SerializeObjects
- Updated2024-10-09
- 2 minute(s) read
Engine.SerializeObjects
Syntax
Engine.SerializeObjects( objects, options = 0)
Return Value
Returns the string that contains the serialized objects.
Purpose
Serializes PropertyObject objects into a string.
Remarks
This method converts one or more objects into a string that can be unserialized using the Engine.UnserializeObjects method. Typically, you use the SerializeObjects and Engine.UnserializeObjects methods to put TestStand data on the Microsoft Windows clipboard and to obtain data from it.
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. Refer to PropertyObject.IsAliasObject for more information about alias objects.
Use the Engine.UnserializeObjectsAndTypes method instead of Engine.UnserializeObjects if you intend to insert the array of property objects generated from the stream into a property object file. Also add the types the Engine.UnserializeObjectsAndTypes method returns to the file by calling the TypeUsageList.Union method on the object the PropertyObjectFile.TypeUsageList property returns. Pass the typesUsed output value as the unionTypeUsageList parameter to TypeUsageList.Union .
When you unserialize a step or a sequence, call the Step.CreateNewUniqueStepId , Sequence.CreateNewUniqueStepIds , or Engine.CreateNewUniqueStepIds methods to replace the unique step ID with a new unique ID.
Parameters
objects As Object Array
[In] Pass the array of property objects to serialize.
options As Long
[In] Specify one or more SerializationOptions using a bitwise combination. This parameter specifies options for how you want to serialize the data. National Instruments recommends using the SerializationOption_UseBinary option for best performance and memory usage, unless you need to parse or read the data more easily. The Engine.UnserializeObjects and Engine.UnserializeObjectsAndTypes methods always autodetect and unserialize the data appropriately.
This parameter has a default value of 0 .
See Also
Engine.UnserializeObjectsAndTypes
PropertyObjectFile.TypeUsageList