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)

Table 1. Parameters
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)

Table 2. Parameters
Name Data Type Description
UserCalcFunctionsVariantArray of UserCalcFunction objects.
FuncStrStringString resulting from conversion
Returns

Boolean. Conversion successful / failed.

W

WriteArray Method (DataRecordset Object)

Applies to:

Attempt to write a set of Data to the Historian archiver.
Note: This function is not fully implemented yet and will always return false current DataRecordset before it imports the specified file.

Syntax

object.WriteArray(DataArray)

Table 3. Parameters
Name Data Type Description
DataArray VariantData 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])

Table 4. Parameters
Name Data Type Description
UseMasterTag BooleanWhether 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])

Table 5. Parameters
Name Data Type Description
XMLHeader StringXML to include before the DataRecordset XML (optional).
StartIndexLongIndex of first tag to include in XML (optional).
EndIndexLongIndex 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])

Table 6. Parameters
Name Data Type Description
XMLHeader String XML to include before message XML (read-only, optional).
StartIndexLongIndex of first message to Include in XML (read-only, optional).
EndIndexLongIndex 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])

Table 7. Parameters
Name Data Type Description
XMLHeader String XML to include before the TagRecordset XML (read-only, optional).
StartIndexLongIndex of first tag to Include in XML (read-only, optional).
EndIndexLongIndex 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