ArcValue Method (ListData object)

                    

 

The ArcValue method returns a PointValues collection containing a single value for each point in the PointList from which the ListData was obtained, at the passed timestamp according to the passed mode. 

 

Syntax

object.ArcValue Timestamp, Mode, NvErrors, AsyncStatus

The ArcValue method syntax has these parts:

Part

Description

object

An object expression that evaluates to a ListData object.

Timestamp

Timestamp of the desired value.  See the Settings section below for allowable values.

Mode

An Enum from RetrievalTypeConstants indicating the manner for determining the value to be returned.

NvErrors

A returned NamedValues collections that can contain server level errors.  See the Remarks below for details.

AsyncStatus

A PIAsynchStatus object used to place asynchronous calls. 

 

Settings

The settings for Timestamp are:

The settings for Mode are:


 

Remarks

 To support partial success, ListData retrieval routines will return a successful result code and use the nvErrors argument, to return server level errors.  The nvErrors collection, if the Count is greater than 0, will contain NamedValue items where the name property is the server name where the error occurred, and the value property is a Variant of type VT_ERROR containing an HRESULT with the server level error.  When an error is encountered for just a particular point, the error is returned in the Value member of the PIValue for the specific point in the returned data collection.  The Value contains a Variant of type VT_ERROR, with the Variant's value containing an HRESULT indicating the particular point related error.

 

True asynchronous calling of this method is now invoked when a PIAsynchStatus object is passed as the AsynchStatus argument.  This means the call will return quickly (generally with success unless local argument checks fail) but the returned PointValues collection will be empty until the call completes. 

 

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..

 

In addition to generic errors, the following point level errors may occur.  These errors will appear in the Value member of the PIValue within the returned collection of results.

Error Description
E_ACCESSDENIED The caller does not have sufficient privileges to access the point or its data.
psePOINTNOTEXIST A point from the PointList was not found on the server.  It may have been deleted or is not visible given the current privileges.
psePIPOINTINIT A PIPoint from the PointList could not be properly initialized.
psePTERRORONSERVER The server reported an error other than access permission or point existence for the point.
Enabling Operational Intelligence