Rename Method (PIPoints collection)

                 

 

The Rename method changes the name of a PIPoint object in the PIPoints collection and also changes the name of the corresponding PI point on the Server.

  

Syntax

object.Rename OldName, NewName

The Rename method syntax has these parts:

Part

Description

object

An object expression that evaluates to a PIPoints object.

OldName

A string expression which specifies the current name of a point on the server.

NewName

A string expression which becomes the point's new name.

 

Remarks

The new name must be distinct from the name of any point already existing on the server, and must follow the naming rules that apply to the particular server. This may have adverse effects on programs which depend on the point’s previous name.  This method is not supported on all types of servers.

Trappable Errors

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

Error

Description

pseNOEMPTYSTRINGS

An empty string or only blanks was passed for a required argument.

pseINVALIDTAGNAME

The passed tag name was found invalid for this server.

pseACCESSDENIED

Insufficient privileges to create an attribute set.

pseTAGEXISTS

A tag already exists with the passed NewName.

psePOINTNOTEXIST

The tag passed as OldName does not exist.

pseNOSERVERSUPPORT

Server does not support the operation

psePIPOINTRENAME

Failed to rename the point.  See the error description string for more information.

Enabling Operational Intelligence