ArcValue Method (PIData object)


The ArcValue returns a reference to a single PIValue object from the server for the associated PIPoint based on the passed time and mode.



object.ArcValue TimeStamp, Mode, AsynchStatus

The ArcValue method syntax has these parts:

Part Description
object An object expression that evaluates to a PIData object.
TimeStamp A Variant specifying the time at which the value is desired.  See the settings for the values this Variant can contain.
Mode The mode is used to determine the value to return when a value does not exist at the exact time specified.  The value is taken from the RetrievalTypeConstants enumeration.  See the settings section below. 
AsyncStatus A PIAsynchStatus object, used to perform asynchronous retrievals and allow canceling of a call.


The settings for the TimeStamp Variant are:

The settings for Mode are:



Trappable Errors

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

Error Description
pseUNSUPPORTEDRETRIEVALTYPE One or more of the retrieval types specified in the PIData object's RetrievalAttributes property is invalid.
pseVARIANTNOTDATE Passed variant containing a string could not be converted to a date.
pseVARIANTTIMETODOUBLE Passed variant containing a string or a date could not be converted from a local date to a UTC time.
pseOBJECTNOTPITIME Passed variant contains and object but the object is not a PITime or does not inherit from PITime.
pseVARIANTTYPEASTIME Passed variant did not contain a string, numeric or object and therefore could not be interpreted as a time.
pseEVENTSRETRIEVE Failed to retrieve an event.  The Description field of the error object contains more detailed information. 
psePIVALUECREATE Unable to create a PIValue for the result to be returned.
psePIEVENTTOPIVALUE Unable to convert a PIevent returned by the server to a PIValue.  See the Description field of the error object for more detailed information.
psePITIMECREATE Failed to create a PITime object for the result to be returned.
pseNOEVENTSFOUND Returned when ArcValue is called with Retrieval Type rtCompressed and there is no value at the passed time.

Enabling Operational Intelligence