CurrentContext (PIUser object)

                

 

The CurrentContext property is a Read/Write string that contains the PIUser's current context. If this has not been set by the application, the CurrentContext is identical to the DefaultContext. The CurrentContext is only maintained in memory during the program. Only changes to the DefaultContext property are persisted on the server. For a discussion on the use of context objects see PIContext .

 

Syntax

object.CurrentContext

The object placeholder is an object expression that evaluates to a PIUser object.

 

Remarks

Only valid server contexts may be assigned to this property. For the list of available contexts on the server, look at the Server.PIContexts collection. To add a new context to the server use PIContexts.Add.

 

Trappable Errors

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

Error

Description

pseUSERDATAFETCH

Unable to retrieve data for a particular user from the server.

pseNOEMPTYSTRINGS

When setting the context the string must be non-blank.

pseCONTEXTNOTFOUND

When setting the CurrentContext the new string does not represent a valid context for this server.

Enabling Operational Intelligence