Remove Method (PIHeadings collection)

             

Removes a PIHeading from the PIHeadings collection.

 

Syntax

object.Remove varPIHeading

The Remove method syntax has these parts:

Part

Description

object

An object expression that evaluates to a PIHeadings collection.

varPIHeading

VARIANT containing the PIHeading to remove, or its Name, UniqueID, or Index in the collection.

 

Remarks

This method permanently removes the PIHeading from the database. Objects that have a PIHeading property (i.e. PIModule, PISubBatch) that references to this PIHeading will no longer be able to resolve that reference. Even if the PIHeading is added back in with the same Name, its UniqueID will be different and the reference will be invalid.

 

Trappable Errors

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

Error

Description

pseLOADPIHEADINGS

Unable to load the existing collection of PIHeadings from the server.

psePIHEADINGNOTFOUND

The requested PIHeading was not found on the server.

pseNOGENSERVER

The parent underlying generic server object could not be retrieved.

pseREMOVEPIHEADING

Unable to remove the PIHeading from the server. The error description will contain more information regarding the problem. Most likely it is because the user didn't have permission.

 

 

Enabling Operational Intelligence