Copy Method (IPIVersion interface)

                    

Adds a new object value at the specified effective date. All editable object properties are set to the values of owner object.

 

Syntax

object.Copy varEffectiveDate

The Copy method syntax has these parts:

Part

Description

object

An object expression that evaluates to an IPIVersion object.

varEffectiveDate

The date the new value goes into effect.

 

Remarks

This method creates a new value of the existing object at the specified EffectiveDate. If the object is a PIModule, another value of the PIModule is created. The newly created value has all properties set identical to the calling object. Generally, the Copy method is more convenient than the AddValue method since it creates a copy of an existing value for the specified EffectiveDate. This method will fail if an object value exists at the specified EffectiveDate.

    

The IPIVersion interface may be supported by any PI-SDK object. The results are returned as an IUnknown object to support this abstraction. Currently, only PIModule supports this interface. The result in this case is a PIModule.

  

Trappable Errors

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

Error

Description

psePIVERSIONCOPY

There was an error copying this value. Either the user doesn't have permission, or there is already a value at that time.

Enabling Operational Intelligence