Company Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI

SerializeObjects Method

NI TestStand™ 4.0 Help
April 2007

NI Part Number:
370052F-01

»View NI TestStand Product Info

Syntax

Engine.SerializeObjects ( objects, options = 0)

Return Value

String

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 UnserializeObjects. Typically, you use the SerializeObjects and UnserializeObjects methods to put TestStand data on the Windows clipboard and to get 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 UnserializeObjectsAndTypes instead of UnserializeObjects if you intend to insert the array of property objects generated from the stream into a property object file. You should also add the types returned by UnserializeObjectsAndTypes to the file. You can add the types to the file by calling TypeUsageList.Union on the object that PropertyObjectFile.TypeUsageList returns. Pass the typesUsed output value as the unionTypeUsageList parameter to TypeUsageList.Union.

When you unserialize a step or a sequence, you should call Step.CreateNewUniqueStepId, Sequence.CreateNewUniqueStepIds, or Engine.CreateNewUniqueStepIds 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] Pass one or more SerializationOptions using a bitwise combination. This parameter specifies options for how you want to serialize the data. National Instruments recommends that you use the SerializationOption_UseBinary option for best performance and memory usage, unless you need to parse or read the data more easily. UnserializeObjects and UnserializeObjectsAndTypes methods always autodetect and unserialize the data appropriately.

This parameter has a default value of 0.


See Also

CreateNewUniqueStepIds

PropertyObject.IsAliasObject

PropertyObject.Serialize

PropertyObject.UnserializeEx

PropertyObjectFile.TypeUsageList

Sequence.CreateNewUniqueStepIds

SerializationOptions

Step.CreateNewUniqueStepId

TypeUsageList.Union

UnserializeObjects

UnserializeObjectsAndTypes


Resources


 

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
Add Comments 1 2 3 4 5 submit