PISystem.ExportXml Method (Object, PIExportMode, String, Object, Object, EventHandler(AFProgressEventArgs))
- Last UpdatedNov 18, 2025
- 4 minute read
- PI System
- AF SDK 2024 R2
- Developer
Exports the XML representation of any object(s) to a file.
Namespace: OSIsoft.AF
Assembly: OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.1.1182
Syntax
public void ExportXml( Object exportObject, PIExportMode exportMode, string file, Object startTime, Object endTime, EventHandler<AFProgressEventArgs> eventHandler )
Public Sub ExportXml ( exportObject As Object, exportMode As PIExportMode, file As String, startTime As Object, endTime As Object, eventHandler As EventHandler(Of AFProgressEventArgs) ) Dim instance As PISystem Dim exportObject As Object Dim exportMode As PIExportMode Dim file As String Dim startTime As Object Dim endTime As Object Dim eventHandler As EventHandler(Of AFProgressEventArgs) instance.ExportXml(exportObject, exportMode, file, startTime, endTime, eventHandler)
public: void ExportXml( Object^ exportObject, PIExportMode exportMode, String^ file, Object^ startTime, Object^ endTime, EventHandler<AFProgressEventArgs^>^ eventHandler )
member ExportXml : exportObject : Object * exportMode : PIExportMode * file : string * startTime : Object * endTime : Object * eventHandler : EventHandler<AFProgressEventArgs> -> unit
Parameters
- exportObject
- Type: SystemObject
The object to return in XML format. If , the PISystem will be used. - exportMode
- Type: OSIsoft.AFPIExportMode
One or more of the PIExportMode values which indicates the amount of data to export. - file
- Type: SystemString
The file to export the XML to. If the file already exists, it will be overwritten. - startTime
- Type: SystemObject
An object representing the earliest starting time for AFEventFrame, AFTransfer, and AFCase objects that may be part of the exported object. Use if no event frame type objects are to be included. The value may be an AFTime, DateTime, PITime, String, or numeric. A DateTime (or a DATE will be treated as UTC time if its Kind property is set to Unspecified. Because DATE values from COM or VB6 clients are marshalled as Unspecified, these client applications must convert to UTC prior to marshalling. An integer numeric represents the number of ticks (100-nanosecond intervals) since January 1, 0001. A floating point numeric represents the number of seconds since January 1, 1970 UTC. A String is interpreted as local time, unless it contains a time zone indicator such as a trailing "Z" or "GMT". Strings will be interpreted with the AFTime.Parse Overload methods so that relative formats with intervals ("*", "T+3h", etc.) are also supported. Relative time intervals are based on the object's QueryDate. - endTime
- Type: SystemObject
An object representing the latest ending time for AFEventFrame, AFTransfer, and AFCase objects that may be part of the exported object. The value may be an AFTime, DateTime, PITime, String, or numeric. A DateTime (or a DATE will be treated as UTC time if its Kind property is set to Unspecified. Because DATE values from COM or VB6 clients are marshalled as Unspecified, these client applications must convert to UTC prior to marshalling. An integer numeric represents the number of ticks (100-nanosecond intervals) since January 1, 0001. A floating point numeric represents the number of seconds since January 1, 1970 UTC. A String is interpreted as local time, unless it contains a time zone indicator such as a trailing "Z" or "GMT". Strings will be interpreted with the AFTime.Parse Overload methods so that relative formats with intervals ("*", "T+3h", etc.) are also supported. Relative time intervals are based on the object's QueryDate. - eventHandler
- Type: SystemEventHandlerAFProgressEventArgs
Delegate used to receive progress indication on operations.
Remarks
The XML representation of the object(s) is generated and output to a file.