Value Method (IPIVersion interface)

             

Gets a value of an object by query date and retrieval type.

Syntax

object.Value varQueryDate, rtCode

The Value method syntax has these parts:

Part Description
object An object expression that evaluates to a IPIVersion object.
varQueryDate

A VARIANT representing the QueryDate. The VARIANT may be a PITime, DATE, String, or numeric. Interpretation of DATE, strings and numerics is consistent with PITime's interpretation.

rtCode RetrievalTypeConstants enumeration specifying type of retrieval.

Remarks

This method is used to find a specific value of the owner object. Allowable retrieval types are explained in the following table:

rtCode Description
rtAtOrBefore Value where EffectiveDate equals QueryDate, else the next value older than QueryDate.
rtAtOrAfter Value where EffectiveDate equals QueryDate, else the next value newer than QueryDate.
rtInterpolated Same meaning as rtAtOrBefore.
rtCompressed Same meaning as rtAtOrBefore.
rtAuto Same meaning as rtAtOrBefore.
rtBefore Next value older than the QueryDate.
rtAfter Next value newer than the QueryDate.

    

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

psePIVERSIONVALUE

There was an error getting the value. Most likely there isn't a value consistent with the QueryDate and the RetrievalTypeConstant arguments.

Enabling Operational Intelligence