Analytica Decision Engine (ADE) API
CAEngine
Creation
Use of ADE really starts with the creation of a CAEngine object, from which all else flows. If you are using the ADEW.dll in-process server, you can only create and use one CAEngine instance. If you are using the ADE.exe out-of-process server, you may create as many CAEngine instances as you desire, each one running as a separate process. In web-based applications, a separate CAEngine instance is typically created for each user session. Each CAEngine instance can have one model loaded at a time.
You can either create a CAEngine instance directly, or by calling CALicense::NewCAEngine(). The later method requires you to first create a CALicense instance, but has the advantage that you can obtain further information about the cause of failure when creation fails. Direct creation of CAEngine will fail if the license to use ADE on the given computer is invalid, expired, etc.
See CAEngine for language-specific details.
Properties
- {get,put} string Command
- {get,put} CAObject CurrentModule
- {get,put} CARenderingStyle DefaultDefTableRenderingStyle
- {get,put} CARenderingStyle DefaultRenderingStyle
- {get} short int ErrorCode
- {get} string ErrorText
- {get} string Log
- {get} string OutputBuffer
- {get,put} bool Photo
Methods
- string AddModule(string filePath,bool Merge)
- bool CloseModel()
- CAObject CreateObject(string objName, string objType)
- bool CreateModel(string newModelName)
- bool DeleteObject( CAObject aObject )
- CAObject Get(string objName)
- CAObject GetObjectByName(string objName)
- bool MonitorProcess(long pid)
- string OpenModel(string filepath)
- bool ReadScript(string filePath)
- void ResetError()
- bool SaveModel(string filePath)
- bool SaveModuleFile(string moduleName, string filePath)
- bool Send()
- bool SendCommand(string command)
CAObject
Creation
A CAObject instances cannot be created directly. You must obtain a CAObject as the return results of other methods. The most common method used to obtain a CAObject is CAEngine::GetObjectByName (or its synonym, CAEngine::Get).
Properties
- {get,put} string ClassType
- {get} short int DefinitionType
- {get,put} long MethodEvaluationTimeLimit
- {get,put} string Name
- {get,put} CARenderingStyle RenderingStyle
- {get,put} short int ResultType
Methods
- bool CreateDefTable(SAFEARRAY indexArray)
- CATable DefTable()
- CATable Evaluate(string expression)
- variant GetAttribute(string attName)
- bool PictureToFile(string fileName, string mimeType)
- bool PictureToStream(IStream stream, string mimeType)
- variant Result()
- CATable ResultTable()
- bool SetAttribute(string attName, variant attValue)
CATable
Creation
Properties
- {get,put} int GraphHeight
- {get,put} int GraphWidth
- {get} variant IndexNames
- {get,put} string Name
- {get} short int NumDims
- {get,put} CARenderingStyle RenderingStyle
- {get,put} short int ResultType
- {get,put} string TableType
Methods
- variant AtomicValue()
- variant GetDataByElements(variant indexPtrs)
- variant GetDataByLabels(variant indexLabels)
- CAIndex GetIndexObject(string indexName)
- variant GetSafeArray()
- bool GraphToFile(string fileName, string mimeType)
- bool GraphToStream(IStream stream, string mimeType)
- string IndexName(short int indexNum)
- bool ObtainTable()
- bool PutSafeArray(variant theVal)
- bool SetDataByElements(variant elementValue, variant indexPtrs)
- bool SetDataByLabels(variant elementValue, variant indexLabels)
- bool SetIndexOrder(SAFEARRAY<string> indexArray)
- CATable Slice(CAIndex index, int i)
- CATable Subscript(CAIndex index, variant label)
- bool Update()
CAIndex
Creation
Properties
- {get} long IndexElements
- {get,put} string Name
- {get,put} CARenderingStyle RenderingStyle
Methods
- long GetNumberByValue(variant val)
- variant GetValueByNumber(long i)
- bool ObtainIndex(string indName)
CARenderingStyle
Creation
Properties
- {get,put} bool FullPrecision
- {get,put} bool GeneralExpression
- {get,put} short HandleFormat
- {get,put} bool NewLineAsCRLF
- {get,put} variant NullValue
- {get,put} bool NumberAsText
- {get,put} bool ReferenceAsText
- {get,put} long SafeArrayLowerBound
- {get,put} short StringQuotes
- {get,put} variant UndefValue
- {get,put} short VarTermFormat
Methods
none
CALicense
Creation
Properties
- {get} long AvailableLicenseInstances
- {get} BOOL MaxLicenseInstances
- {get} short int ErrorCode
- {get} string ErrorText
- {get} long MaxLicenseInstances
- {get} string CALicense::RlmHostId
- {get} string CALicense::RlmPath
- {get} string CALicense::RlmUserId
Methods
- CAEngine NewCAEngine()
- void SetApplicationLicenseCode(string)
Enable comment auto-refresher