TK Class

Script Toolkit
<System.Reflection.Obfuscation(Feature = "renaming", ApplyToMembers = true)> _ 
Public Class TK
This language is not supported or no code example is available.
[System.Reflection.Obfuscation(Feature = "renaming", ApplyToMembers = true)] 
public static class TK
This language is not supported or no code example is available.
Name Description
Public property Static ObjServer Internal Use
Top
Methods
 
Name Description
Public method Static AddElementToAsset(string, string, bool) Add element name to asset
Public method Static AddElementToAssetAsync(string, string, bool) Add element name to asset
Public method Static AddValuesToTagHistorian(string[], IList<Double>[], IList<Int32>[], IList<DateTime>[]) Add new values to tag historian
Public method Static AddValuesToTagHistorianAsync(string[], IList<Double>[], IList<Int32>[], IList<DateTime>[]) Add new values to tag historian async
Public method Static ArrayDataDefined(string) Gets array size from tag. The size depends to value of quality. The first index found different of Undefined from bottom to top is the returned value.
Public method Static ArraySize(string) Gets array size from tag
Public method Static Asset(string) Get reference to asset
Public method Static BeginExecuteClassMethodOnServer(string, string, AsyncCallback, object, object[]) Begin async execute method of class Server domain
Public method Static BeginGetAllAttributes(string, int, bool, AsyncCallback, object) Begin get attributes of TagProvider from initial element
Public method Static BeginGetAssets(string, AsyncCallback, object) Begin get assets from initial element
Public method Static BeginGetChildrenElements(string, eTkElementType, AsyncCallback, object) Begin get children from element name
Public method Static BeginGetElementType(string, AsyncCallback, object) Begin get type from element name
Public method Static BulkTreatAlarm(string, object[], int[], DateTime[]) Bulk treat alarms of a tag
Public method Static Char(int) Gets char
Public method Static ClearTag(ArrayObj<UserType>) Clear tag
Public method Static ClearTag(string) Clear tag name
Public method Static CompareTag(UserType, UserType) Compare tags
Public method Static CompareTag(string, string) Compare tags
Public method Static CompileExpression(string) Compiles the simple expression using a data series
Public method Static ConvertTo<T>(object) Performs convert to type
Public method Static CopyAssetToTagAsync(string, UserType) Copy asset to tag
Public method Static CopyAssetToTagAsync(string, string) Copy asset to tag
Public method Static CopyDataTableToTag(DataTable, UserType) Copy datatable to tag
Public method Static CopyDataTableToTag(DataTable, string) Copy datatable to tag
Public method Static CopyNetObjectToTag(object, IArrayObj, bool) Copy .NET object to tag
Public method Static CopyNetObjectToTag(object, string, bool) Copy .NET object to tag
Public method Static CopyTagToAssetAsync(string, string) Copy asset to tag
Public method Static CopyTagToDataTable(UserType) Copy tag values to datatable
Public method Static CopyTagToDataTable(string) Copy tag values to datatable
Public method Static CopyTagToDataTableAsync(string) Copy tag values to datatable async
Public method Static CopyTagToNetObject(IArrayObj, object, bool, bool) Copy tag values to .NET object
Public method Static CopyTagToNetObject(string, object, bool, bool) Copy tag values to .NET object
Public method Static CopyTagToTag(UserType, UserType) Copy tag values to another tag
Public method Static CopyTagToTag(string, string) Copy tag values to another tag
Public method Static CreateSyncMarker() Create a sync marker. Sync marker is used to ensure that all objects were syncronized to server
Public method Static CreateTaskEvent(string, object, bool, bool, int) Create an event to be executed
Public method Static DoubleQuotes(string) Add double quote at the start and end of the string
Public method Static DownloadFileToLocalStorage(string, string, bool) Download file and save local
Public method Static EndExecuteClassMethodOnServer(IAsyncResult, object[]) End an asynchronous execute class method
Public method Static EndGetAllAttributes(IAsyncResult) End an asynchronous GetAllAttributes method
Public method Static EndGetAssets(IAsyncResult) End an asynchronous GetAssets method
Public method Static EndGetChildrenElements(IAsyncResult, out bool, out bool) End an asynchronous GetChildElement method
Public method Static EndGetElementType(IAsyncResult) End an asynchronous GetElementType method
Public method Static EvaluateExpression(string) Evaluates simple expression
Public method Static EvaluateExpression(string, IDictionary<StringObject>[], Type[], string[]) Evaluates the simple expression using a data series
Public method Static ExecuteClassMethodOnServer(string, string, object[]) Execute method of class Server domain
Public method Static ExecuteClassMethodOnServerAsync(string, string, object[]) Execute method of class Server domain async
Public method Static ExecutePythonShell(string, object[]) Execute Python Shell. Not available for HTML5Client
Public method Static FileSaveAs(object, string) Save content as file
Public method Static GeneratePassword(int) Generates default password
Public method Static GetAllAttributes(string, int, bool) Get attributes of TagProvider from initial element
Public method Static GetAllAttributesAsync(string, int, bool) Get attributes of TagProvider from initial element async
Public method Static GetAssetDouble(string) Get value to asset converted to double
Public method Static GetAssetFolderName(string) Get asset path from object name
Public method Static GetAssetFolderNameAsync(string) Get asset path from object name async
Public method Static GetAssetNameAsDisplayText(string) Get asset name as display text
Public method Static GetAssetNameAsDisplayTextAsync(string) Get asset name as display text
Public method Static GetAssetPathFromExternalTag(string, bool) Get asset name from full syntax
Public method Static GetAssets(string) Get assets from initial element
Public method Static GetAssets(string, bool) Gets asset names from asset path
Public method Static GetAssetsAsync(string, bool) Gets asset names from asset path async
Public method Static GetAssetsAsync(string) Get assets from initial element async
Public method Static GetCategoryNameFromIDs(UInt64, bool) Get names or titles of categories
Public method Static GetChildrenElements(string, eTkElementType) Get children from element name
Public method Static GetChildrenElements(string, out bool, out bool) Get children from element name
Public method Static GetChildrenElementsAsync(string, TRef<bool>, TRef<bool>) Get children from element name async
Public method Static GetChildrenElementsAsync(string, eTkElementType) Get children from element name async
Public method Static GetElementType(string) Gets element type from element name
Public method Static GetElementTypeAsync(string) Gets element type from element name async
Public method Static GetImage(int) Retrieves the image stream based on the provided image ID.
Public method Static GetImageAsync(int) Retrieves the image stream based on the provided image ID (Async).
Public method Static GetImageIDFromName(string) Retrieves the image ID based on the provided image name.
Public method Static GetImageIDFromNameAsync(string) Retrieves the image ID based on the provided image name (Async).
Public method Static GetLastNode(string) Get the last h9de of a Path
Public method Static GetMembers(string, EditInfo) Get name of each member from object name
Public method Static GetMembersAsDataRow(string, EditInfo) Gets members from object name
Public method Static GetMembersInfo(string, EditInfo) Gets info from object name
Public method Static GetObjectValue(string) Gets object value
Public method Static GetParentElement(string) Gets parent name from element name
Public method Static GetParentElementAsync(string) Gets parent name from element name async
Public method Static GetParentFolder(string) Gets parent of asset path
Public method Static GetParentFolderAsync(string) Gets parent of asset path async
Public method Static GetSubFolders(string) Get children from asset path
Public method Static GetSubFoldersAsync(string) Get children from asset path async
Public method Static GetTagChildren(string, bool) Get children from object name
Public method Static GetTagChildrenAsDataRow(bool, string) Get children from object name
Public method Static GetTagChildrenAsDataRow(string, bool) Get children from object name
Public method Static GetTagChildrenInfo(bool, string) Get children from object name
Public method Static GetTagHistorian(string, DateTimeOffset, object, string, bool, bool, bool, bool, string) Get historical from tag
Public method Static GetTagHistorian(string, double, double, string, long, bool, string) Get historical from tag
Public method Static GetTagHistorianAsync(string, DateTimeOffset, object, string, bool, bool, bool, bool, string) Get historical from tag async
Public method Static GetTagHistorianAsync(string, double, double, string, long, bool, string) Get historical from tag async
Public method Static GetTagProviderFromAsset(string) Get TagProvider name from full syntax
Public method Static GetTagsHistorian(string[], DateTimeOffset, object, string, bool, bool, bool, bool, string) Get historical from array of tag
Public method Static GetTagsHistorianAsync(string[], DateTimeOffset, object, string, bool, bool, bool, bool, string) Get historical from array of tag async
Public method Static GetTaskEvent(string) Get object containing information being executed
Public method Static GetTaskEventCount() Return number of events to be executed
Public method Static GetValueFromHistorian(string, DateTime) Gets historian value from tag name
Public method Static GetValueFromHistorianAsync(string, DateTime) Gets historian value from tag name
Public method Static GetValuesFromHistorian(string[], DateTime) Get historian values from tag names
Public method Static GetValuesFromHistorianAsync(string[], DateTime) Get historian values from tag names async
Public method Static HasAttributes(string) Gets if element name has attributes
Public method Static HasAttributesAsync(string) Gets if element name has attributes async
Public method Static HasChildren(string) Gets if element name has children
Public method Static HasChildrenAsync(string) Gets if element name has children async
Public method Static HasHistorian(string) Gets if tag name has historian
Public method Static HasHistorianAsync(string) Gets if tag name has historian
Public method Static IIf(bool, object, object)
Public method Static InitializeTag(ArrayObj<UserType>, object) Initialize tag with a value
Public method Static InitializeTag(string, object) Initialize tag with a value
Public method Static InternalExecuteClassMethodOnClient(string, string, params object[]) Internal use
Public method Static InternalExecuteClassMethodOnServer(string, string, params object[]) Internal use
Public method Static IsArrayBase(string) Gets if tag is array
Public method Static IsAttribute(string, int) Gets if element name is an attribute
Public method Static IsAttributeAsync(string, int) Gets if element name is an attribute async
Public method Static IsFromTemplate(string) Gets if tag is a user template
Public method Static IsTagDevicePointPrimaryStation(string, string) Returns whether tag is using Device Node PrimaryStation or BackupStation
Public method Static LoadFromXML(string, string) Load XML file and copy to tag
Public method Static LoadFromXML(string, UserType) Load XML file and copy to tag
Public method Static LoadFromXMLString(string, string) Load XML data and copy to tag
Public method Static LoadFromXMLString(string, UserType) Load XML data and copy to tag
Public method Static LoadSnapshotTags(string) Load tag values from file.
Public method Static LogException(Exception, string) Log exception on TraceWindow
Public method Static Logical(object) Return logic from a value
Public method Static LogicalNot(object) Return inverse logic from a value
Public method Static NormalizeObjectName(string, bool) Normalize object name
Public method Static PreloadObject(string) Preload main properties from object name. Used to improvement performance while getting object by first ime
Public method Static PreloadObject(string, string[]) Preload main properties from object name. Used to improvement performance while getting object by first ime
Public method Static PrepareTK(ObjectServer) Internal Use
Public method Static RandomNext(int, int) Returns a random integer that is within a specified range.
Public method Static Round() Returns a random floating-point number that is greater than or equal to 0.0, and less than 1.0.
Public method Static SaveImageAsPDF(string, string, bool, int, string, string, string, string, string) Save image as PDF file
Public method Static SaveImageAsPDFAsync(string, string, bool, int, string, string, string, string, string) Save image as PDF file async
Public method Static SaveSnapshotTags(string) Save current tag values to file.
Public method Static SaveToXML(string, UserType) Create XML file from tag
Public method Static SaveToXML(string, string)
Public method Static SaveToXMLString(UserType) Create XML data from tag
Public method Static SaveToXMLString(string) Create XML data from tag
Public method Static SetActiveAssets(string, bool) Set active flag of the assets that already were used previously
Public method Static SetAsset(string, object) Set new value to asset
Public method Static SetObjectValue(string, object) Sets new value for object
Public method Static SetObjectValue(string, object, int, DateTimeOffset, bool) Sets new value for object
Public method Static SetReferenceLinkAsync(UserType, string) Set reference links of template members
Public method Static SetReferenceLinkAsync(string, string) Set reference links of template members
Public method Static SplitAsset(string) Split asset
Public method Static TIf(bool, object, object)
Public method Static To(Type, object) Performs convert to type
Public method Static To<T>(object) Performs convert to type
Public method Static ToBool(object) Performs convert to boolean
Public method Static ToDateTime(object) Performs convert to DateTime
Public method Static ToDateTimeOffset(object, DateTimeKind) Performs convert to DateTimeOffset
Public method Static ToDouble(object) Performs convert to double
Public method Static ToInt(object) Performs convert to int
Public method Static ToLong(object) Performs convert to long
Public method Static ToString(object) Performs convert to string
Public method Static ToText(object) Performs convert to string
Public method Static ToTimeSpan(object) Performs convert to TimeStamp
Public method Static Toggle(object) Toggles value
Public method Static Trace(string, eTkTraceType, string, string, string) Log a message to TraceWindow
Public method Static UnitsConversion(string, string) Convert tag value to new unit
Public method Static UnitsConversionAsync(string, string) Convert tag value to new unit async
Public method Static UnzipFile(string, string) Extracts all the files in the specified zip archive to a directory on the file system.
Public method Static WaitSyncMarker(object, TimeSpan) Wait all objects will be syncronized to server
Public method Static WaitSyncMarkerAsync(object, TimeSpan) Wait all objects will be syncronized to server async
Public method Static ZipFile(string, string) Creates a zip archive that contains the files and directories from the specified directory.
Top
Name Description
Public enumeration eTkElementType Enum element type
Public enumeration eTkTraceType Enum trace type
Top

.NET Framework

Supported in: 4.8

In this article

Definition