Method Reference U-Z
U
UnSelectAll Method (TagRecordset Object)
Applies to:
Clears all selections in the current TagRecordset. See the SelectAll method and the Master Tag Property.
Syntax
object.UnSelectAll
Parameters
None
Returns
None
Example
' Clear any current selection MyRecordset.UnSelectAll
UserCalcFunctionsFromString Method (Server Object)
Applies to:
Converts the given string to an array of user calculation functions. The string is assumed to have been generated from a call to UserCalcFunctionsToString.If no functions exist in the string, UserCalcFunctions will be set to Empty.
Syntax
object.UserCalcFunctionsFromString(FuncStr, UserCalcFunctions)
Name | Data Type | Description |
---|---|---|
FuncStr | String | String to convert. |
UserCalcFunctions | Variant | Resulting array of UserCalcFunction objects. |
Returns
Boolean. Conversion successful / failed.
UserCalcFunctionsToString Method
Applies to:
Converts the given array of user calculation functions to a string.
To convert an empty set of functions, pass a non-array value such as Empty.
Syntax
object.UserCalcFunctionsToString(UserCalcFunctions, FuncStr)
Name | Data Type | Description |
---|---|---|
UserCalcFunctions | Variant | Array of UserCalcFunction objects. |
FuncStr | String | String resulting from conversion |
Boolean. Conversion successful / failed.
W
WriteArray Method (DataRecordset Object)
Applies to:
false current DataRecordset
before it imports the specified file.Syntax
object.WriteArray(DataArray)
Name | Data Type | Description |
---|---|---|
DataArray | Variant | Data Array to be written to the Historian archiver. |
Returns
Boolean. Write succeeded / failed.
WriteRecordset Method (DataRecordset Object)
Applies to:
Saves changes made to the DataRecordset object to the Historian server. If DataValues have not changed, the method does not write DataValues to the server.
Syntax
object.WriteRecordset
Parameters
None
Returns
Boolean. Write succeeded / failed.
WriteRecordset Method (MessageRecordset Object)
Applies to:
Saves changes made to the MessageRecordset object to the Historian server. Only new messages are written to the server.
Syntax
object.WriteRecordset
Parameters
None
Returns
Boolean. Write succeeded / failed.
WriteRecordset Method (TagRecordset Object)
Applies to:
Saves changes made to the TagRecordset Object to the Historian server. If tags have not changed, they are not re-written to the server.
Syntax
object.WriteRecordset([UseMasterTag])
Name | Data Type | Description |
---|---|---|
UseMasterTag | Boolean | Whether to apply Master tag changes to all tags (read-only optional). |
Returns
Boolean. Write succeeded / failed.X
XML Method (DataRecordset Object)
Applies to:
Returns an XML document fragment representing the DataValues and DataFields contained in the current DataRecordset.
Syntax
object.XML([XMLHeader], [StartIndex], [EndIndex])
Name | Data Type | Description |
---|---|---|
XMLHeader | String | XML to include before the DataRecordset XML (optional). |
StartIndex | Long | Index of first tag to include in XML (optional). |
EndIndex | Long | Index of last tag to include in XML (optional). |
Returns
String. An XML document fragment string.Example
Dim Recordset As DataRecordset
' Get A New Data Recordset
Set Recordset = MyServer.Data.NewRecordset
' Fill In Criteria, Get One Tag For Yesterday
With Recordset.Criteria
.Tagmask = "MyNode.OneTag.F_CV"
.StartTime = DateAdd("d", -1, Now)
.EndTime = Now
End With
' Fill In Fields, Timestamp and Value
With Recordset.Fields
.TimeStamp = True
.Value = True End With
Recordset.QueryRecordset
' Print XML to Debug Window
Debug.Print Recordset.XML
XML Method (MessageRecordset Object)
Applies to:
Returns an XML document fragment representing the Messages and MessageFields contained in the current MessageRecordset.Syntax
object.XML([XMLHeader], [StartIndex], [EndIndex])
Name | Data Type | Description |
---|---|---|
XMLHeader | String | XML to include before message XML (read-only, optional). |
StartIndex | Long | Index of first message to Include in XML (read-only, optional). |
EndIndex | Long | Index of last message to include in XML (read-only, optional). |
Returns
String. An XML document fragment string.
XML Method (TagRecordset Object)
Applies to:
Returns an XML document fragment representing the Tags and TagFields contained in the current TagRecordset.Syntax
object.XML([XMLHeader], [StartIndex], [EndIndex])
Name | Data Type | Description |
---|---|---|
XMLHeader | String | XML to include before the TagRecordset XML (read-only, optional). |
StartIndex | Long | Index of first tag to Include in XML (read-only, optional). |
EndIndex | Long | Index of last tag to include in XML (read-only, optional). |
Example
Dim Recordset As TagRecordset
' Get a new tag recordset
Set Recordset = MyServer.Tags.NewRecordset
' Fill in criteria, aet all tags
With Recordset.Criteria
.Tagname = "*"
End With
' Fill in fields, get tagname and description
With Recordset.Fields
.Tagname = True
.Description = True
End With
Recordset.QueryRecordset
' Print XML to debug window
Debug.Print Recordset.XML