A Read-Only Boolean property indicating whether the Server object currently has an active connection to a PI server. Typically when first acquiring a Server object from the Servers collection and before calling the Open method, this property is false. Once the Open method has been successfully executed the connected property is true.
The object placeholder is an object expression that evaluates to a Server object.
The returned value is a Boolean.
If, before calling Open, you access any Server properties or methods which require a server connection, the PI-SDK attempts to make an implicit connection using the connection string from the last successful connection to this Server by the current process. If no connections have yet been made, the connection is attempted as if calling the Open method with no arguments.
While a PI-SDK program is running, a Server object may lose its connection to the server even though the Close method was not called. For example, the server may be shut down, or the network connection may be broken. When the PI-SDK detects this condition, it attempts to reconnect and sets the connected property as appropriate. See the topic "Reconnection" listed in the See Also section of this page for more information.
In some cases, the PI-SDK will not be aware of the lost connection and checking the Connected property may return True; but a subsequent method call or property access may return an error indicating the connection has been lost. In this case the Connected property is updated when the error is detected.