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

AF SDK Reference

PISystem Class

  • Last UpdatedNov 18, 2025
  • 22 minute read
PISystem Class
The PISystem represents a single logical data store for the AF SDK.

Inheritance Hierarchy

SystemObject
  OSIsoft.AFAFObject
    OSIsoft.AFPISystem

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

Syntax

[SerializableAttribute]
public sealed class PISystem : AFObject, 
	IAFSecurable, IAFTimeSource, IAFChangedEvent, IComparable<PISystem>, 
	IEquatable<PISystem>, IDisposable
<SerializableAttribute>
Public NotInheritable Class PISystem
	Inherits AFObject
	Implements IAFSecurable, IAFTimeSource, IAFChangedEvent, IComparable(Of PISystem), 
	IEquatable(Of PISystem), IDisposable

Dim instance As PISystem
[SerializableAttribute]
public ref class PISystem sealed : public AFObject, 
	IAFSecurable, IAFTimeSource, IAFChangedEvent, IComparable<PISystem^>, 
	IEquatable<PISystem^>, IDisposable
[<SealedAttribute>]
[<SerializableAttribute>]
type PISystem =  
    class
        inherit AFObject
        interface IAFSecurable
        interface IAFTimeSource
        interface IAFChangedEvent
        interface IComparable<PISystem>
        interface IEquatable<PISystem>
        interface IDisposable
    end

The PISystem type exposes the following members.

Properties

  NameDescription
Public property
AliasNames
The list of alias names for the PISystem.
Public property
AnalysisRulePlugIns
Gets the collection of AFAnalysisRule plugin objects maintained by the PISystem.
Public property
AnalysisService
This property returns the AFAnalysisService object associated with this PISystem.
Public property
AuthenticationMode
Read-only property that returns the Authentication Mode of the .
Public property
AutoCreateNotificationsEnabled
Gets or sets a value indicating if the AutoCreate option is enabled for the PISystem.
Public property
Collective
This property returns information and status about the PI AF Server collective.
Public property
ConfigStringValidationEnabled
Gets or sets a value indicating if plugins are enabled to validate configuration strings when set.PISystem.
Public property
ConfiguredOidcIdentities
Read-only property that returns the a collection of the configured AFOidcIdentity of the .
Public property
ConfiguredRoles
Read-only property that returns the a collection of the configured Roles of the .
Public property
ConnectionInfo
This property returns information about the connection to the PI AF Server from the local computer.
Public property
CurrentUserIdentities
Gets the list of AFSecurityIdentity identities of the person who is currently logged on to the PISystem server.
Public property
CurrentUserIdentityString
Gets the security identity string of the person who is currently logged on to the PISystem server.
Public property
CurrentUserName
Gets the user name of the person who is currently logged on to the PISystem server.
Public property
Databases
This property provides access to the AFDatabases collection that corresponds to the list of databases that have been created on this PISystem.
Public property
DatabaseVersion
Read-only property that contains a string that uniquely identifies the current database version.
Public property
DataReferencePlugIns
Gets the collection of AFDataReference plugin objects maintained by the PISystem.
Public property
DefaultAuthenticationMode
Returns AFAuthenticationMode shared by parent collection.
Public property
DefaultPIServerName
This property is the name of the default PIServer for this PISystem.
Public property
DeliveryChannelPlugIns
Gets the collection of AFDeliveryChannel plugin objects maintained by the PISystem.
Public property
DeliveryFormats
The collection of global AFDeliveryFormat objects.
Public property
Description
Read/write property that provides a more detailed description of the object.
Public property
EventsEnabled
Gets or sets a value indicating if events are enabled for the PISystem.
Public property
ExtendedProperties
A dictionary of extended properties that can be used to store application specific information.
Public property
FileAllowedExtensions
The list of valid file extensions for an AFFile.
Public property
FileMaxLength
The maximum allowed file size for an AFFile.
Public property
HasItemsCheckedOut
Determines if any items are currently checked out in the PISystem.
Public property
HasItemsCheckedOutToMe
Determines if any items are currently checked out to the current user in the PISystem.
Public property
ID
Read-only property that provides a unique identifier for the object to be used for quick access that is not dependent upon the index.
(Inherited from AFObject.)
Public property
Identity
This read-only property contains identity of the object.
(Inherited from AFObject.)
Public property
IdentityServerAuthorizationEndpoint
Read-only property that returns the Authorization Endpoint for the Identity Server for the . Will match unless connecting to a different RSSO Server.
Public property
IdentityServerEndpointAddress
Read-only property that returns the endpoint address for the Primary Identity Server for the .
Public property
IsDeleted
This read-only property indicates whether the object has been deleted.
(Inherited from AFObject.)
Public property
IsDirty
Indicates whether there are system level objects in the PISystem that have been modified since the last save in to persistent storage.
Public property
IsReadOnly
True if operations that make modifications are blocked on this instance.
Public property
IsShared
True if this instance is shared with other users with the same set of identities.
Public property
Libraries
This property provides access to the AFLibraries collection that corresponds to the list of known libraries on the server.
Public property
Name
This property identifies the name of the PISystem.
Public property
NotificationContactTemplates
Gets the collection of top-level pre-configured notification contacts maintained on this PISystem.
Public property
PISystem
This read-only property allows access to the PISystem associated with this object.
(Inherited from AFObject.)
Public property
Security
This read-only property returns the AFSecurity information for the object.
Public property
SecurityIdentities
This property provides access to the AFSecurityIdentities collection that corresponds to the list of security identities on the server.
Public property
SecurityMappings
This property provides access to the AFSecurityMappings collection that corresponds to the list of security mappings on the server.
Public property
SelectedAuthenticationMode
Returns the AFAuthenticationMode for the current connection. If not connected, None is returned.
Public property
ServerTime
Gets the current time of the PI AF Server.
Public property
ServerTimeZone
Gets the current time zone of the PI AF Server.
Public property
ServerVersion
Read-only property that contains a string that uniquely identifies the current server version.
Public property
TimeRulePlugIns
Gets the collection of AFTimeRule plugin objects maintained by the PISystem.
Public property
UniqueID
Read-only property that provides the object's ID as a String.
(Inherited from AFObject.)
Public property
UOMDatabase
This property provides access to the UnitsOfMeasure database UOMDatabase that contains the UnitsOfMeasure that have been created on the PISystem.
Public property
UsingDefaultAuthenticationMode
Returns true if PISystem is using the default shared AFAuthenticationMode

Methods

  NameDescription
Public methodCode example
ApplyChanges
This method applies (saves) all the changes to objects modified at the system level by the current user and makes those changes available to other applications executing under the same user account.
Public methodCode example
ApplyChanges(AFCheckedOutMode)
This method applies (saves) all the changes to objects modified at the system level according to the specified AFCheckedOutMode and makes those changes available to other applications executing under the same user account.
Public methodCode example
ApplyChanges(IListIAFTransactable)
This method applies (saves) the changes to the specified modified objects and makes those changes available to other objects.
Public method
CanCreateCollective
Check if a collective can be created for this PISystem.
Public methodCode example
CheckIn
This method checks in (commits) all the changes to all modified objects at the system level by saving the object's information to persistent storage.
Public methodCode example
CheckIn(AFCheckedOutMode)
This method checks in (commits) all the changes to all modified objects at the system level by saving the object's information to persistent storage according to the specified AFCheckedOutMode.
Public methodCode example
CheckIn(IListIAFTransactable)
This method checks in (commits) the changes to the specified modified objects by saving the object's information to persistent storage.
Public method
CompareTo(Object)
Compares this instance with a specified Object.
(Inherited from AFObject.)
Public method
CompareTo(AFObject)
Compares this instance with a specified AFObject.
(Inherited from AFObject.)
Public methodCode example
Connect
Connects to the server using default credentials to allow sending and retrieving data.
Public methodCode example
Connect(NetworkCredential)
Connects to the server using the specified credentials to allow sending and retrieving data.
Public methodCode example
Connect(String)
Connects to the server using the specified Access Token to allow sending and retrieving data.
Public methodCode example
Connect(AFConnectionPreference)
Connects to the server using the specified connection preference to allow sending and retrieving data.
Public methodCode example
Connect(Boolean, IWin32Window)
Connects to the server with a credential prompt if necessary to allow sending and retrieving data.
Public methodCode example
Connect(NetworkCredential, AFConnectionPreference)
Connects to the server using the specified credentials and connection preference to allow sending and retrieving data.
Public methodCode example
Connect(String, AFConnectionPreference)
Connects to the server using the specified Access Token to allow sending and retrieving data.
Public methodCode example
Connect(String, String)
Connects to the server using the specified credentials to allow sending and retrieving data.
Public methodCode example
Connect(Boolean, IWin32Window, AFConnectionPreference)
Connects to the server using the specified connection preference with a credential prompt if necessary to allow sending and retrieving data.
Public methodCode example
Connect(String, String, AFConnectionPreference)
Connects to the server using the specified credentials to allow sending and retrieving data.
Public methodCode example
Connect(Boolean, IWin32Window, AFConnectionPreference, Boolean)
Connects to the server using the specified connection preference with a credential prompt if necessary to allow sending and retrieving data and return an indication that dialog was canceled.
Public methodCode example
ConnectWithPrompt
Connects to the server prompting for credentials.
Public methodCode example
ConnectWithPrompt(IWin32Window)
Connects to the server prompting for credentials.
Public methodCode example
ConnectWithPrompt(AFConnectionPreference)
Connects to the server prompting for credentials and specifying a connection preference.
Public methodCode example
ConnectWithPrompt(IWin32Window, AFConnectionPreference)
Connects to the server prompting for credentials and specifying a connection preference.
Public method
CreateCollective
Convert the PISystem into a member of a new AFCollective.
Public methodStatic member
CreatePISystem
Create a new PISystem instance based upon the specified host address.
Public method
Disconnect
Disconnects an open connection to the PI AF Server.
Public method
Equals(Object)
Determines whether the specified Object is equal to the current object.
(Overrides AFObjectEquals(Object).)
Public method
Equals(AFObject)
Indicates whether the current object is equal to another object of the same type.
(Inherited from AFObject.)
Public method
Equals(PISystem)
Indicates whether the current object is equal to another object of the same type.
Public method
ExportCsv(Object, IListType, IListString, CultureInfo)
Exports the CSV representation of requested object(s) and returns it as a string.
Public method
ExportCsv(Object, IListType, IListString, PIExportMode, CultureInfo)
Exports the CSV representation of requested object(s) and returns it as a string.
Public method
ExportCsv(Object, IListType, IListString, CultureInfo, String, Object, Object, EventHandlerAFProgressEventArgs)
Exports the representation of requested object(s) in comma-separated (CSV) format to a file.
Public method
ExportCsv(Object, IListType, IListString, PIExportMode, CultureInfo, String, Object, Object, EventHandlerAFProgressEventArgs)
Exports the representation of requested object(s) in comma-separated (CSV) format to a file.
Public method
ExportXml(Object, PIExportMode)
Exports the XML representation of any object(s) and returns it as a string.
Public method
ExportXml(Object, PIExportMode, String, Object, Object, EventHandlerAFProgressEventArgs)
Exports the XML representation of any object(s) to a file.
Public method
ExportXml(Object, PIExportMode, XmlWriter, Object, Object, EventHandlerAFProgressEventArgs)
Exports the XML representation of any object(s) to an XmlWriter.
Public methodCode example
FindChangedItems(Boolean, AFTime, AFTime) Obsolete.
Find all the items that have changed in the PISystem.
Public methodCode example
FindChangedItems(Boolean, Int32, Object, Object)
Find all the items that have changed in the PISystem for all types of objects.
Public methodCode example
FindChangedItems(AFIdentity, Boolean, AFTime, AFTime) Obsolete.
Find all the items that have changed in the PISystem of the specified type.
Public methodCode example
FindChangedItems(Boolean, Boolean, Int32, Object, Object)
Find all the items that have changed in the PISystem with the option to retrieve both the system and database level changes.
Public methodCode example
FindChangedItems(AFIdentity, Boolean, Int32, Object, Object)
Find all the items that have changed in the PISystem of the specified type.
Public methodCode example
FindChangedItems(AFIdentity, Boolean, Boolean, Int32, Object, Object)
Find all the items that have changed in the PISystem of the specified type with the option to retrieve both the system and database level changes.
Public method
FindCheckedOutItems
This method finds all the items that are currently checked out in the PISystem.
Public method
GetActiveDirectoryProperties
Retrieves the Active Directory settings the server uses to retrieve contact information.
Public method
GetAnonymousClientChannelTChannel
Creates a ChannelFactory. The factory will be created using the provided binding and address. The channel will use a TLS connection with no client credentials.
Public method
GetClientChannelTChannel
Creates a ChannelFactory. The factory will be created using the appropriate binding and address based on the AFAuthenticationMode the PISystem is currently connected with.
Public methodCode example
GetClientRpcMetrics
Get the remote procedure call metrics to the server for this PISystem.
Public method
GetCsvColumns(Type)
Retrieve a collection containing the required and optional CSV columns for the specified object type and its children.
Public method
GetCsvColumns(Type, IListType)
Retrieve a collection containing the required and optional CSV columns for the specified object type and its children.
Public methodCode example
GetFindChangedItemsCookie
Retrieve the server cookie used in conjunction with FindChangedItems.
Public method
GetHashCode
Gets the hash code for this instance of the object which is suitable for use in hashing algorithms and data structures like a hash table.
(Overrides AFObjectGetHashCode.)
Public method
GetIdentityProvidersandRoles
Returns a collection of the configured Roles of the .
Public method
GetIdentityServerBestRsso
Method to retrieve the Best Redundant Single Sign-On Server Endpoint for the Identity Server for the .
Public method
GetObjectCounts
Gets the total number of objects by type in the database.
Public method
GetPath
Returns the full path to the object, using just the names.
(Inherited from AFObject.)
Public method
GetPath(AFObject)
Returns the path to the object relative from another object.
(Inherited from AFObject.)
Public method
GetPath(AFEncodeType, AFObject)
Returns the path to the object relative from another object, using the name and/or id as specified by encodeType.
(Inherited from AFObject.)
Public methodCode example
GetRpcMetrics
Get the remote procedure call metrics for the server.
Public method
GetSecurity
Gets the AFSecurity information of the specified security item associated with the object.
Public method
GetSessions(NullableAFTime, NullableAFTime, AFSortOrder, Int32, Int32)
Retrieves session data for the specified filter criteria.
Public method
GetSessions(NullableAFTime, NullableAFTime, AFSessionSortField, AFSortOrder, Int32, Int32)
Retrieves session data for the specified filter criteria.
Public method
GetType
Gets the Type of the current instance.
(Inherited from Object.)
Public method
ImportCsv(AFDatabase, PIImportMode, CultureInfo, Stream, EventHandlerAFProgressEventArgs)
Imports the comma-separated value (CSV) representation of any object from a stream.
Public method
ImportCsv(AFDatabase, PIImportMode, CultureInfo, String, EventHandlerAFProgressEventArgs)
Imports the comma-separated value (CSV) representation of any object from a file.
Public method
ImportXml(Object, PIImportMode, String)
Imports the XML representation of any object from either a file or string.
Public method
ImportXml(Object, PIImportMode, Stream, EventHandlerAFProgressEventArgs)
Imports the XML representation of any object from a stream.
Public method
ImportXml(Object, PIImportMode, XmlReader, EventHandlerAFProgressEventArgs)
Imports the XML representation of any object from an XmlTextReader.
Public method
LogOut
Logs out the current OIDC user and disconnects all associated open connections to the PI AF Server.
Public method
Persist
This method returns the persistence string for the object.
(Inherited from AFObject.)
Public method
Refresh
Refreshes the client with any changes that have been made to any system-level object since loaded.
Public method
Refresh(Boolean)
Refreshes the client with any changes that have been made to any system-level and optionally database-level objects since loaded.
Public method
Refresh(IEnumerableAFObject)
Refreshes the client with any changes that have been made to the specified objects since they were loaded.
Public method
RemovePlugInAssembly
Removes a AFPlugIn assembly from the database.
Public method
RemovePlugInSupportAssembly
Removes an AFPlugIn support assembly from the database.
Public method
SetActiveDirectoryProperties
Sets the Active Directory settings the server uses to retrieve contact information.
Public method
Supports(PISystemFeatures)
Checks if the specified PISystemFeatures feature is supported by the PISystem.
Public method
Supports(String, Boolean)
Checks if the specified feature is supported by the PISystem.
Public method
ToString
Returns a String that represents the current object.
(Inherited from AFObject.)
Public method
UndoCheckOut
Rolls back all the changes to the system since the last call to the CheckOut method of each object. Any changes since the check out will be lost.
Public method
UploadPlugInAssembly
Uploads a AFPlugIn assembly to the database.
Public method
UploadPlugInSupportAssembly
Uploads a AFPlugIn support assembly to the database.

Events

  NameDescription
Public eventCode example
Changed
Event is raised when the object or one of its sub-objects is changed.
Public eventCode example
ConnectChanged
Occurs when the connection status of this PISystem to the PI AF Server changes.

Operators

  NameDescription
Public operatorStatic member
Equality
The equality operator (==) compares its operands to determine if they are equal.
Public operatorStatic member
Inequality
The inequality operator (!=) compares its operands to determine if they are not equal.

Remarks

PISystem objects are retrieved from the PISystems collection and provide access to the basic entities represented on the PISystem.

Typically, a program requires a network connection to the server where the PISystem is located. Connections are established by calling one of the Connect Overload methods. The Disconnect method is used to break the connection to the server. A PISystem could represent a AFCollective of servers which provide high-availability. If the Collective is not , then the PISystem represents a collective of servers.

Many of the services available through the PISystem are accessed through its properties, which return other objects.

Examples

PISystems myPISystems = new PISystems();

// Display information for Default PISystem
AFConnectionInfo myConnectionInfo = myPISystems.DefaultPISystem.ConnectionInfo;
Console.WriteLine("Name of Default PISystem = {0}", myPISystems.DefaultPISystem.Name);
Console.WriteLine("Description of Default PISystem = {0}", myPISystems.DefaultPISystem.Description);
Console.WriteLine("Host used to connect to Default PISystem = {0}", myConnectionInfo.Host);
Console.WriteLine("Port used to connect to Default PISystem = {0}", myConnectionInfo.Port);
Console.WriteLine("Protocol used to connect to Default PISystem = {0}", myConnectionInfo.Protocol);
Console.WriteLine();

// Display the version of the PISystems
Console.WriteLine("Version of the PISystems = {0}", myPISystems.Version);

// Display the number of PISystems
Console.WriteLine("PISystem count = {0}", myPISystems.Count);

// Display PISystem information
foreach (PISystem sys in myPISystems)
{
    Console.WriteLine("   Name of PISystem = {0}", sys.Name);
    Console.WriteLine("   Description of PISystem = {0}", sys.Description);
    Console.WriteLine("   UniqueID of PISystem = {0}", sys.UniqueID);
    Console.WriteLine();
}

// Add a new PISystem
PISystem newSys = myPISystems.Add("NewPISystem");
newSys.ConnectionInfo.Host = "localhost";
Dim myPISystems As New PISystems()

' Display information for Default PISystem
Dim myConnectionInfo As AFConnectionInfo = myPISystems.DefaultPISystem.ConnectionInfo
Console.WriteLine("Name of Default PISystem = {0}", myPISystems.DefaultPISystem.Name)
Console.WriteLine("Description of Default PISystem = {0}", myPISystems.DefaultPISystem.Description)
Console.WriteLine("Host used to connect to Default PISystem = {0}", myConnectionInfo.Host)
Console.WriteLine("Port used to connect to Default PISystem = {0}", myConnectionInfo.Port)
Console.WriteLine("Protocol used to connect to Default PISystem = {0}", myConnectionInfo.Protocol)
Console.WriteLine()

' Display the version of the PISystems
Console.WriteLine("Version of the PISystems = {0}", myPISystems.Version)

' Display the number of PISystems
Console.WriteLine("PISystem count = {0}", myPISystems.Count)

' Display PISystem information
For Each sys As PISystem In myPISystems
    Console.WriteLine("   Name of PISystem = {0}", sys.Name)
    Console.WriteLine("   Description of PISystem = {0}", sys.Description)
    Console.WriteLine("   UniqueID of PISystem = {0}", sys.UniqueID)
    Console.WriteLine()
Next

' Add a new PISystem
Dim newSys As PISystem = myPISystems.Add("NewPISystem")
newSys.ConnectionInfo.Host = "localhost"

No code example is currently available or this language may not be supported.

No code example is currently available or this language may not be supported.

Version Information

AFSDK


See Also

TitleResults for “How to create a CRG?”Also Available in