Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AF SDK Reference

PISystem.CreatePISystem Method

  • Last UpdatedNov 18, 2025
  • 2 minute read
PISystem.CreatePISystem Method
Create a new PISystem instance based upon the specified host address.

Namespace:  OSIsoft.AF
Assembly:  OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.1.1182

Syntax

public static PISystem CreatePISystem(
	string host,
	bool forceNewInstance = false
)
Public Shared Function CreatePISystem ( 
	host As String,
	Optional forceNewInstance As Boolean = false
) As PISystem

Dim host As String
Dim forceNewInstance As Boolean
Dim returnValue As PISystem

returnValue = PISystem.CreatePISystem(host, 
	forceNewInstance)
public:
static PISystem^ CreatePISystem(
	String^ host, 
	bool forceNewInstance = false
)
static member CreatePISystem : 
        host : string * 
        ?forceNewInstance : bool 
(* Defaults:
        let _forceNewInstance = defaultArg forceNewInstance false
*)
-> PISystem 

Parameters

host
Type: SystemString
The name of the host machine where the PI AF Server for this PISystem is executing.
forceNewInstance (Optional)
Type: SystemBoolean
Set to to force the creation of an independent PISystem object for the current user with a separate cache.

Return Value

Type: PISystem
Returns the PISystem instance based upon the specified host address for the current user.

Remarks

This method will return a PISystem instance based upon the specified host address for the current user. If the same user calls this method multiple times, the same instance of the PISystem is returned. If a different user calls this method, then a new instance of the PISystem is returned that is independent of the previous user's object.

It is important to call this method to acquire the correct PISystem for a user in a multi-user application before accessing SDK objects. This will ensure the correct object cache and connection to the server is used for the user.

Version Information

AFSDK

Supported in: 3.1.1, 3.1.0, 3.0.2, 3.0.1, 3.0.0, 2.10.11, 2.10.5, 2.10.0, 2.10, 2.9.5, 2.9, 2.8.5, 2.8, 2.7.5

See Also

In This Topic
Related Links
TitleResults for “How to create a CRG?”Also Available in