Find method (StateSets collection)

               

 

This method is used to find StateSet collections that contain all or some of a passed list of DigitalState names. The method returns a NamedValues collection containing the names of the StateSet collections that meet the passed criteria.

 

Syntax

object.Find nvStates, ContainsConstants

The Find method syntax has these parts:

Part

Description

object

An object expression that evaluates to a StateSets collection.

nvUserNames

A NamedValues collection containing the DigitalState names desired

ContainsConstants

A constant from the ContainsConstants enumeration indicating what type of search to perform. See below.

 

Settings

The settings for ContainsConstants are:

Setting

Description

cntnsAll

Returned StateSet collections must contain all of the passed digital states.

cntnsSome

Returned StateSet collections need only contain 1 or more of the passed digital states.

cntnsOnly

Returned StateSet collections must contain only digital states from the passed list.

 

Remarks

If successful this method returns a NamedValues collection of StateSet names. If no matching StateSet collections are found the returned collection will have a count of 0.

 

Trappable Errors

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

Setting

Description

pseNAMEDVALUESCREATE

Unable to create a NamedValues collection to return.

Enabling Operational Intelligence