Delphi Interface |
![]() |
The Delphi interface consists of 8 files. The first 5 files are in the arulesxl\api\bin_redist directory. The last 3 files are in the arulesxl\api\delphi directory.
To use the Delphi interface you need to install the Arules component as follows:
Then:
Description:
function QueryRulesToStringList(ruleset: string; query: string; answer: TStringList): boolean;
Remarks:
Queries the named ruleset and returns the result as a list of strings.
Return Value:
The result of the query as a Delphi TStringList.
Returns false on failure.
Example:
plan := TStringList.Create;
arxl.QueryRulesToStringList('vaclogic', 'FIND plans', plan);
Description:
function QueryRulesToStringList(ruleset: string; query: string; answer: TStringList): boolean;
Remarks:
Queries the named ruleset and returns the result as a list of strings. This call differs from QueryRulesToStringList() because any values that were found during prior queries are retained. This lets you query the same ruleset repeatedly gaining new information each time, instead of having to compute the values for all the objects each time.
Return Value:
The result of the query as a Delphi TStringList.
Returns false on failure.
Example:
history := TStringList.Create;
arxl.QueryMoreToStringList('vaclogic', 'FIND history', history);
Description:
procedure LoadTableFromNameValueList(ruleset: string; objectname: string; col1name: string; col2name: string; nvlist: TStrings);
Remarks:
Loads the specified fact in the specified ruleset with a list of names and values in a Delphi TStrings object. The TStrings object needs to use the Delphi NameValueSeparator to distinguish the 'name' and 'value' entries.
Return Value:
Throws an exception on failure.
Example:
arxl.LoadTableFromNameValueList('CommonRules', 'raw_vaccination', 'Vaccination', 'Date', nvlist);
The function GetLS() does not return a TLSEngine object as documented in the Amzi! Logic Server Reference Guide. Instead it returns a TLSARules object. This is so you can have both the Amzi! and ARulesXL Delphi components installed at the same time. Other than that, the Logic Server functions are identical.
First install the Delphi component as outlined above. Then:
Run from the Delphi IDE. Enter a value for swing speed, and select other choices from the pull-down menus then press 'Query'.
![]() |
Copyright ©2005-7 Amzi! inc. All Rights Reserved.
|