Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

Apps, Widgets, and Controls

AddHistorianSource

  • Last UpdatedDec 20, 2018
  • 1 minute read

AddHistorianSource method adds a new history source.

Example

Dim b as object;

b = Trend1.AddHistorianSource("idc_insql12", "InSQL");

Syntax

[Result =] Trend1.AddHistorianSource(string HistorySourceName, string Type);

Parameters

HistorySourceName

The name of the history source.

Type

The type of history source "InSQL" or "InTouch".

Return Value

If there is already a server with the given name in the list, the object for that server is returned. Otherwise, a new server with the given name is added to the list and the object for the new server is returned.

Whenever the AddHistorianSource method is used in a script, such as the Predefined Script OnShow on a symbol, we strongly recommend that you add a corresponding call to RemoveHistorianSource. This can be added in a Predefined Script OnHide on a symbol. AddHistorianSource creates resources inside the InTouch view application that are not cleaned up when a window is closed during a view.exe session. To clean up these resources, you must use a call from a script to RemoveHistorianSource, or close the view.exe session and end the runtime application.

In This Topic
TitleResults for “How to create a CRG?”Also Available in