Add Method (PointClasses collection)

                

 

Creates a new logical point class and attaches it to the Server.PointClasses collection. Returns a reference to a PointClass object which contains the attributes and the default values of the new point class. A PointClass can be used as a template for creating points.

 

Syntax

object.Add className, attrSetNames

The Add method syntax has these parts:

Part

Description

object

An object expression that evaluates to a PointClasses collection.

className

A string containing the name for the new PointClass

attrSetNames

An array of strings containing the names of the attribute sets, as obtained from Server.AttributeSets, that together define the desired attributes for the new point class. The “base” attribute set must be included. The array size should equal the number of attribute sets needed to define the PointClass.  Extra blank elements are not tolerated by this function.

 

Remarks

When creating new point classes, certain attributes are required for proper operation. These attributes are contained in the "base" attribute set which is why this set must be included when creating a point class.

 

When creating a PointClass it is illegal to specify attribute sets which would result in duplicate named attributes.

 

Trappable Errors

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

Error

Description

psePOINTCLASSINSTANTIATE

Unable to instantiate a PointClass object.

pseATTRSETNAMES

Problem accessing the passed array of attribute set names.

pseSETNAMENOTFOUND

One or more of the passed attribute sets does not exist on the server.

psePOINTCLASSADD

Unable to add the point class on the server. The error description contains more detailed information.

pseNOEMPTYSTRINGS

Empty strings or all blank strings are not permitted for the set name.

psePTCLASSCREATENOBASE

The passed array of attribute sets did not include the "base" attribute set.

Enabling Operational Intelligence