AddValue Method (IPIVersion interface)



Adds a new object value at the specified effective date. The new object, will have all properties set to default.



object.AddValue varEffectiveDate


The AddValue method syntax has these parts:




An object expression that evaluates to a IPIVersion object.


The date the new value goes into effect.



This method creates a new instance of the existing object at the specified effective date. The newly created value has all properties set to default; defaults are usually empty strings and collections. Generally, the Copy method is more convenient to use since it creates a copy of an existing value for the specified effective date.


This method will fail if an object value already exists at the specified effective date.


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 error may occur:




There was an error adding this value. Most likely it was caused by the caller not having permission.

Enabling Operational Intelligence