stPro Automation API's

The following API functions are available for use with the stPro Automation Interface:

 

API method:

Description:

AddPen

Adds a pen to the trend graph.

AddPenViaAliasName

Adds a pen to the trend graph specifying the required item via it's Alias name.

AddSession

Add an additional session to the stPro client.

CloseCurrentSession

Close the currently visible stPro client session.

ConfigDataCollection

Set the data collection attributes when connected directly to a Data Source.

ConnectToCollector

Instructs the control to connect to the named Sapphire Collector.

ConnectToOPCDA

Instructs the control to connect to the named Data Access (DA) OPC Server.

ConnectToOPCHDA

Instructs the control to connect to the named Historical Data Access (HDA) OPC Server.

Disconnect

Causes the control to disconnect from the current Data Source.

DisconnectAll

Causes the control to disconnect from all connected Data Sources.

EnableMultipleConnections

Allow the control to establish connections with more than one Data Source.

FetchData

Populates the graph with data and control the scan state.

FitToView

Re-scale all the pens in Auto-scale mode.

GetConnectionAttribute

Gets the specific connection attribute for the default Data Source.

GetConnections

Gets the list of currently connected Data Sources.

GetConnectionState

Reports on the state of the default connection.

GetCurrentPlot

Gets the name of the current plot (if any).

GetCurrentSession

Get a handle to the current session.

GetDefaultConnection

Get the Connection String for the Data Source that is the default for creating new plots etc.

GetDisplayMask

Returns a mask indicating what is currently displayed in the plot.

GetLastError

Get the last API Error.

GetNumberOfPens

Returns the number of items being currently being trended.

GetPenAttribute

Gets the specified attribute for the chosen pen.

GetPenHandle

Get the Pen handle for a given Item.

GetPens

Returns the list of pens currently being trended.

GetPlotAttribute

Get the specified attribute for the Active plot.

GetPlots

Get a list of known plots.

GetSDRs

Returns the list of SDRs held by the data collector the control is connected to.

GetSessionName

Get the name of the current session.

GetSessions

Get a list of the names of all the loaded sessions.

GetUserPreference

Fetch the value of the specified User Preference for the current User account.

GetVersionString

Returns version information about the control.

HasConnectionContext

Call this function to determine whether stPro has a valid connection to a Data Source.

IsValidItem

Check to see if the Item assigned to the given pen is valid.

LoadPlotWindow

Call this function to load a plot file into an existing or a new window.

LoadPrefsFile

Customize the control from a predefined user preferences file.

LoadSessionFile

Call this function to load a session file into an existing instance of stPro.

NewPlotWindow

Call this function to create a plot window.

PrintTrend

Send the current plot file to the default Printer for printing.

RemoveAllPens

Remove all the pens within the current plot.

RemoveAllPlots

Remove all the open plots.

RemoveNamedPen

Remove a pen that is currently being based on it's item name.

RemovePen

Removes a pen that is currently being trended using it's item handle.

RemovePlot

Call this function to remove the given plot.

SavePlotFile

Save the plot to the specified filename.

SetConnectionAttribute

Sets the connection attributes for the default Data Source.

SetCurrentPlot

Call this function to make the specified Plot the current plot.

SetCurrentSession

switch between loaded sessions (see AddSession).

SetDefaultConnection

Elect which Data Source is used as the default when creating new plots etc.

SetDelimiter

Sets the delimiting character for separating sections of attribute values

SetDisplayMask

Controls what is displayed in the plot.

SetDurationSeconds

Sets the duration of the period the plot covers.

SetGraphStyle

Set the required Graph Style for the plot.

SetPenAttribute

Set the specified attribute for the chosen pen.

SetPlotAttribute

Set the specified attribute fore the chosen plot.

SetPlotPeriod

Set the period for the plot by specifying the required start and end time.

SetScaleAuto

Request that the high and low Y-axis scales for the pen are automatically calculated.

SetScaleLink

Link the scales for the Current pen to another pen using pen handles.

SetScaleLinkByName

Link the scales for the Current pen to another pen using Item names.

SetScaleManual

Set the high and low Y-axis scales to user specified values.

SetSDR

Sets the SDR for the trend. This determines what points can be plotted on the plot.

SetTargets

Set the pen Targets for Radar Plots.

SetUserPreference

Set a specific User Preference for the current User.

Synchronize

Synchronizes all other graphs with this plot.