GetObjServers Method (IPIServers interface)

              

 

This method restores the servers from the objects contained in another object.

 

Syntax

object.GetObjectServers, hErrors, pnvsContext

The RestoreObject method syntax has these parts:

Part

Description

object

An object expression that evaluates to a reference to an IPIServers interface. See the Applies To list in the IPIServers definition for a list of objects that support this interface.

hErrors

A PIErrors collection containing any errors encountered.

pnvsContext

A NamedValues collection containing context variables.

  

Remarks

Returns a NamedValues collection of the servers for the objects contained in another object. The Name property of each NamedValue is the server name. The Value property of each NamedValue is a pointer to the Server object.

This is useful when accessing objects that may contain other objects from another server. For example, PIAlias's in a PIAliases collection under a PIModule can contain PIPoint's from any PI Server. By using the GetObjServers method, an application can find out which Servers are not configured on the client machine. By examining the hErrors collection, the user can be presented the name of each server not found and asked to add that server to the PISDK.Servers collection.

 

Trappable Errors

In addition to generic errors (such as Out of Memory), errors are returned in the hErrors collection. The Cause property of each PIError is set to the Name of the Server for the object that caused the error.

Error

Description

pseGETOBJSERVERS

There was an error restoring the server for an object.

 

 

Enabling Operational Intelligence