Method Reference E-H
E
Export Method (Alarms Object)
Exports the contents of the AlarmRecordSet into the specified file.
Syntax
object.Export(AlmRS, RSInfo, FileName, FileFormat)
Name | Data Type | Description |
---|---|---|
AlmRS | AlarmRecordSet | Returns the requested records (writeable). |
RSInfo | AlarmOpenRecordSetInfo | Contains descriptions of the desired records (read-only). |
FileName | String | Fully qualified export filename (read-only). |
FileFormat | ihFileFormat | File format of the export file (read-only). |
Returns
Boolean. Returns whether or not the Export operation succeeded.
Export Method (DataRecordset Object)
Exports the contents of the current DataRecordset into the specified file.
Syntax
object.Export(FileName, FileFormat)
Name | Data Type | Description |
---|---|---|
FileName | String | Fully qualified export filename (read-only. |
FileFormat | ihFileFormat | File format of the export file (read-only). |
Returns
Boolean. Returns whether or not the Export operation succeeded.
Example
' Export File From Existing Query Results
If Not MyRecordset.Export("C:\Temp\DataReport.RPT", ihFileFormat.Report) Then
Err.Raise 1, , "Error Exporting File: " + MyRecordset.LastError
End If
Export Method (EnumeratedSets Object)
Applies to:
Exports the contents of the EnumeratedSets collection into the specified file.
The following file formats are supported:
Name | Description | Value |
---|---|---|
CSV | File is imported/exported as comma separated values. | 1 |
XML | File is imported/exported as XML. | 2 |
Imported files follow a specific format that contains specific keywords. With CSV, the first row of the file establishes the fields in the file and their positions. With XML reports, the files describe the format of the data.
Syntax
object. Export(FileName, FileFormat)
Name | Data Type | Description |
---|---|---|
FileName | String | Fully qualified export file name (read-only). |
FileFormat | ihFileFormat | File format of the export file (read-only). |
Returns
Boolean. Returns True if the sets have been exported successfully.
Export Method (MessageRecordset Object)
Exports the contents of the current MessageRecordset into the specified file.
The following file formats are supported. Exported files follow a specific format containing specific keywords. With CSV and tabular reports, the first row of the file establishes the fields in the file and their positions. With XML, the file itself describes the format of the data.
Name | Description | Value |
---|---|---|
CSV | File is imported/exported as comma separated values. | 1 |
XML | File is imported/exported as XML. | 2 |
Report | File is exported as a columnar report | 3 |
Syntax
object.Export(FileName, FileFormat)
Name | Data Type | Description |
---|---|---|
FileName | String | Fully qualified export file name (read-only). |
FileFormat | ihFileFormat | File format of the export file (read-only). |
Returns
Boolean. Success/Failure.
Export Method (TagRecordset Object)
Exports the contents of the current TagRecordset into the specified file.
The following file formats are supported:
Name | Description | Value |
---|---|---|
CSV | File is imported/exported as comma separated values. | 1 |
XML | File is imported/exported as XML. | 2 |
Report | File is exported as a columnar report | 3 |
Syntax
object.Export(FileName, FileFormat)
Name | Data Type | Description |
---|---|---|
FileName | String | Fully qualified export file name (read-only). |
FileFormat | ihFileFormat | File format of the export file (read-only). |
Returns
Returns whether or not the Export operation succeeded.
Example
' Export file from existing query results
Set MyRecordset = MyServer.Tags.NewRecordset
MyRecordset.Criteria.Tagname = "*"
MyRecordset.Fields.AllFields
MyRecordset.QueryRecordset
If Not MyRecordset.Export(Path & "TagReport.RPT", ihFileFormat.Report) Then
err.Raise 1, , "Error exporting file: " & MyRecordset.LastError
End If
Export Method (UserDefinedType Object)
Applies to:
Exports the contents of the User Defined Type into the specified file.
The following file formats are supported:
Name | Description | Value |
---|---|---|
CSV | File is imported/exported as comma separated values. | 1 |
XML | File is imported/exported as XML. | 2 |
Syntax
Name | Data Type | Description |
---|---|---|
FileName | String | Fully qualified export file name (read-only). |
FileFormat | ihFileFormat | File format of the export file (read-only). |
Returns
Boolean. Returns TRUE if the User Defined Type is exported successfully.
G
GetCurrentValue Method (Collector Object)
Returns the current value for a given tag.
Syntax
object.GetCurrentValue(SourceAddress, ErrorMessage, CurrentValue)
Name | Data Type | Description |
---|---|---|
SourceAddress | String | The tag source address. |
ErrorMessage | String | The error message string encountered, if any. |
CurrentValue | String | A DataValue object representing the current tag value. |
Returns
Dim OPC1 As iHistorian_SDK.Collector
Dim MyTagValue As Variant
Dim MyErrorMessage As String
' Request The Collector To Get the Current Value for a Tag
Set OPC1 = MyCollectors.Item("USIM031_OPC1")
OPC1.GetCurrentValue "OPCTag1", MyErrorMessage, MyTagValue
GetFilters Method (OPCFilters Object)
Returns the current set of Filters configured for MyCollector.
Syntax
object.GetFilters(MyServer, MyCollector)
Name | Data Type | Description |
---|---|---|
MyServer | Variant | The Historian server connection. |
MyCollector | MyCollector | The Collector object to acquire the Filter information for. |
Returns
Boolean true on success, false otherwise
GetLastError Method (Server Object)
Returns the last error message encountered by the Server object. To see a complete list of messages, refer to the ErrorList property. When possible, the system translates messages into the locale of the client.
Syntax
object.GetLastError
Parameters
None
Returns
String. The last error message encountered.
GetPrimaryCollectorName Method (Collectors Object)
Returns the name of the Primary Collector for a set of redundantly configured Collectors.
Syntax
object.GetPrimaryCollectorName(CollectorName)
Name | Data Type | Description |
---|---|---|
CollectorName | String | The name of the Collector. |
Returns
String. The primary collector name.