Add Method (StateSet collection)

               

 

Creates a DigitalState and adds it to the end of the StateSet collection. Returns a reference to the created DigitalState object. The new DigitalState is created on the Server as well as added to the memory representation of the collection.

 

Syntax

object.Add Name

The Add method syntax has these parts:

Part

Description

object

An object expression that evaluates to a StateSet collection.

Name

A string containing the new DigitalState name.

 

Remarks

DigitalStates are added to the end of the current set. To change a single state within the StateSet use the RenameState method. To reorganize the states or add and remove multiple states use the ReplaceStates method.

 

Trappable Errors

In addition to generic errors (such as Out of Memory), the following errors may occur:

Error

Description

pseLOADSTATESET

Unable to load the current StateSet from the server.

pseNOGENSERVER

The underlying server abstraction layer could not be accessed.

pseDIGSTATEADD

Unable to add the DigitalState to the StateSet on the server. The error description contains more specific information.

Enabling Operational Intelligence