Skip to main content

RtBaseline_GetAFValues

RtBaseline_GetAFValues is the main data extraction function. It implements a complete AF data search and extraction from multiple AF/Sigmafine servers for all kinds of elements (except AFTransfers), and returns a matrix based on the input parameters given to the method.

Web Method Synopsis (C# Syntax)

public DataSet RtBaseline\_GetAFValues( 
string sRuleSelect,
string sRuleOutput,
string sAFAnalysisPath,
DateTime dSearchStart,
DateTime dSearchEnd
bool bFromTag,
bool bShowUoM,
string sGroupBy,
string sSecurityModule,
string sSortColumn);

Output Result

DATASET ® Returns a matrix of the retrieved results based on element selection and output column-set format, as specified in the input parameters. For an EAI scenario, the output format is a standard XML DIFFGRAMM document. (For further information, refer to Microsoft XML DIFFGRAM v1.x and v2.x specifications.)

Input Parameters

sRuleSelect (STRING) ® Element selection query statement. The selection query uses a specific query language.

sRuleOutput (STRING) ® Column-list specifications. This field specifies the number, the name, and the format of the columns that will be returned by this method. If no specifications are provided, only the selected AFElement name, description, and GUID is provided to the caller (3 columns). This field uses a specific syntax described below:

AFTemplate1.AFAttrib_A;AFTemplate1\>.\<AFAttrib_B\>;……\<AFTemplateN\>.\<AFAttrib_X\>

ClosedEXAMPLE: RtBaseline_GetAFValues

MyPumpTemplate.Area;MyPumpTemplate.Category;MyPumpTemplate.Efficiency

sAFAnalysisPath (STRING) ® Sigmafine AFAnalysis path. Specify the Sigmafine specific path according to the model configuration with the following format: \\Server\Database\Model\AFAnalysis.

dSearchStart (DATETIME) ® Start time of the search specified in standard XML format.

dSearchEnd (DATETIME) ® Start time of the search specified in standard XML format.

bFromTag (BOOLEAN) ® This flag indicates if the read operation must be done from the indicated AF attributes or from the PI-TAGS configured upon the attributes. (Option valid only for those users running a PI System as historian.)

TRUE ® read operation from PI-TAGS

FALSE ® (DEFAULT) read operation from AFATTRIBUTE (standard behavior)

bShowUoM (BOOLEAN) ® This flag indicates if in the returned DataSet the values of each requested attribute/field for each element should be returned together with its Unit Of Measure. This causes all returned fields to be automatically converted to string with the precision specified in the WEB.CONFIG file.

TRUE ® output format with UoM (all return fields in string format)

FALSE ® (DEFAULT) output format without UoM (fields will be returned with their specific type (Float32, Currency, DataTime, Integer… etc)

sGroupBy (STRING) ® This field indicates the Grouping-mode like the GROUP-BY SQL statement. Available options:

TYPE ® Group results by AF Element Type

TEMPLATE ® Group results by AF Template

CATEGORY ® Group results by AF Element/Attribute Category

sSecurityModule (STRING) ® Reserved for WDE - Leave blank.

sSortcolumn (STRING) ® Name of the column used for sorting elements. If 'null' or 'empty', the sort is done on the element name.

Important Note

There is a new feature known as "FastWay" that allows Sigmafine Web Services to extract the elements inside a case three times faster. This rule only works if there is no filter over the element, but user wants to extract all the elements within a case. To enable the FastWay, set:

  • sRuleSelect ® (Blank)
  • sAFAnalysisPath (STRING) ® A valid Sigmafine AFAnalysis path with the following format: \\Server\Database\Model\AFAnalysis