Difference between revisions of "Analytica Decision Engine (ADE) API"

(Redirected page to ADE Server Class Reference)
 
(21 intermediate revisions by 3 users not shown)
Line 1: Line 1:
= [[CAEngine]] =
+
#REDIRECT [[ADE Server Class Reference]]
==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 [[CAEngine::Command|Command]]
 
* {get,put} CAObject [[CAEngine::CurrentModule|CurrentModule]]
 
* {get,put} [[CARenderingStyle]] [[CAEngine::DefaultDefTableRenderingStyle|DefaultDefTableRenderingStyle]]
 
* {get,put} [[CARenderingStyle]] [[CAEngine::DefaultRenderingStyle|DefaultRenderingStyle]]
 
* {get} short int [[CAEngine::ErrorCode|ErrorCode]]
 
* {get} string [[CAEngine::ErrorText|ErrorText]]
 
* {get} string [[CAEngine::Log|Log]]
 
* {get} string [[CAEngine::OutputBuffer|OutputBuffer]]
 
* {get,put} bool [[CAEngine::Photo|Photo]]
 
 
 
==Methods==
 
* string [[CAEngine::AddModule|AddModule]](string filePath,bool Merge)
 
* bool [[CAEngine::CloseModel|CloseModel]]()
 
* [[CAObject]] [[CAEngine::CreateObject|CreateObject]](string objName, string objType)
 
* bool [[CAEngine::CreateModel|CreateModel]](string newModelName)
 
* bool [[CAEngine::DeleteObject|DeleteObject]]( [[CAObject]] aObject )
 
* [[CAObject]] [[CAEngine::Get|Get]](string objName)
 
* [[CAObject]] [[CAEngine::GetObjectByName|GetObjectByName]](string objName)
 
* string [[CAEngine::OpenModel|OpenModel]](string filepath)
 
* bool [[CAEngine::ReadScript|ReadScript]](string filePath)
 
* void [[CAEngine::ResetError|ResetError]]()
 
* bool [[CAEngine::SaveModel|SaveModel]](string filePath)
 
* bool [[CAEngine::SaveModuleFile|SaveModuleFile]](string moduleName, string filePath)
 
* bool [[CAEngine::Send|Send]]()
 
* bool [[CAEngine::SendCommand|SendCommand]](string command)
 
* bool [[CAEngine::MonitorProcess|MonitorProcess]](long pid)
 
 
 
= [[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 [[CAObject::ClassType|ClassType]]
 
* {get} short int [[CAObject::DefinitionType|DefinitionType]]
 
* {get,put} long [[CAObject::MethodEvaluationTimeLimit|MethodEvaluationTimeLimit]]
 
* {get,put} string [[CAObject::Name|Name]]
 
* {get,put} [[CARenderingStyle]] [[CAObject::RenderingStyle|RenderingStyle]]
 
* {get,put} short int [[CAObject::ResultType|ResultType]]
 
 
 
==Methods==
 
 
 
* bool [[CAObject::CreateDefTable|CreateDefTable]](SAFEARRAY indexArray)
 
* [[CATable]] [[CAObject::DefTable|DefTable]]()
 
* [[CATable]] [[CAObject::Evaluate|Evaluate]](string expression)
 
* variant [[CAObject::GetAttribute|GetAttribute]](string attName)
 
* bool [[CAObject::PictureToFile|PictureToFile]](string fileName, string mimeType)
 
* bool [[CAObject::PictureToStream|PictureToStream]](IStream stream, string mimeType)
 
* variant [[CAObject::Result|Result]]()
 
* [[CATable]] [[CAObject::ResultTable|ResultTable]]()
 
* bool [[CAObject::SetAttribute|SetAttribute]](string attName, variant attValue)
 
 
 
= [[CATable]] =
 
==Creation==
 
==Properties==
 
* {get,put} int [[CATable::GraphHeight|GraphHeight]]
 
* {get,put} int [[CATable::GraphWidth|GraphWidth]]
 
* {get} variant [[CATable::IndexNames|IndexNames]]
 
* {get,put} string [[CATable::Name|Name]]
 
* {get} short int [[CATable::NumDims|NumDims]]
 
* {get,put} [[CARenderingStyle]] [[CATable::RenderingStyle|RenderingStyle]]
 
* {get,put} short int [[CATable::ResultType|ResultType]]
 
* {get,put} string [[CATable::TableType|TableType]]
 
 
 
==Methods==
 
* variant [[CATable::AtomicValue|AtomicValue]]()
 
* variant [[CATable::GetDataByElements|GetDataByElements]](variant indexPtrs)
 
* variant [[CATable::GetDataByLabels|GetDataByLabels]](variant indexLabels)
 
* [[CAIndex]] [[CATable::GetIndexObject|GetIndexObject]](string indexName)
 
* variant [[CATable::GetSafeArray|GetSafeArray]]()
 
* bool [[CATable::GraphToFile|GraphToFile]](string fileName, string mimeType)
 
* bool [[CATable::GraphToStream|GraphToStream]](IStream stream, string mimeType)
 
* string [[CATable::IndexName|IndexName]](short int indexNum)
 
* bool [[CATable::ObtainTable|ObtainTable]]()
 
* bool [[CATable::PutSafeArray|PutSafeArray]](variant theVal)
 
* bool [[CATable::SetDataByElements|SetDataByElements]](variant elementValue, variant indexPtrs)
 
* bool [[CATable::SetDataByLabels|SetDataByLabels]](variant elementValue, variant indexLabels)
 
* bool [[CATable::SetIndexOrder|SetIndexOrder]](SAFEARRAY<string> indexArray)
 
* [[CATable]] [[CATable::Slice|Slice]]([[CAIndex]] index, int i)
 
* [[CATable]] [[CATable::Subscript|Subscript]]([[CAIndex]] index, variant label)
 
* bool [[CATable::Update|Update]]()
 
 
 
= [[CAIndex]] =
 
==Creation==
 
==Properties==
 
* {get} long [[CAIndex::IndexElements|IndexElements]]
 
* {get,put} string [[CAIndex::Name|Name]]
 
* {get,put} [[CARenderingStyle]] [[CAIndex::RenderingStyle|RenderingStyle]]
 
 
 
==Methods==
 
* long [[CAIndex::GetNumberByValue|GetNumberByValue]](variant val)
 
* variant [[CAIndex::GetValueByNumber|GetValueByNumber]](long i)
 
* bool [[CAIndex::ObtainIndex|ObtainIndex]](string indName)
 
 
 
= [[CARenderingStyle]] =
 
==Creation==
 
==Properties==
 
* {get,put} bool [[CARenderingStyle::FullPrecision|FullPrecision]]
 
* {get,put} bool [[CARenderingStyle::GeneralExpression|GeneralExpression]]
 
* {get,put} short [[CARenderingStyle::HandleFormat|HandleFormat]]
 
* {get,put} bool [[CARenderingStyle::NewLineAsCRLF|NewLineAsCRLF]]
 
* {get,put} variant [[CARenderingStyle::NullValue|NullValue]]
 
* {get,put} bool [[CARenderingStyle::NumberAsText|NumberAsText]]
 
* {get,put} bool [[CARenderingStyle::ReferenceAsText|ReferenceAsText]]
 
* {get,put} long [[CARenderingStyle::SafeArrayLowerBound|SafeArrayLowerBound]]
 
* {get,put} short [[CARenderingStyle::StringQuotes|StringQuotes]]
 
* {get,put} variant [[CARenderingStyle::UndefValue|UndefValue]]
 
* {get,put} short [[CARenderingStyle::VarTermFormat|VarTermFormat]]
 
 
 
==Methods==
 
 
 
''none''
 
 
 
= [[CALicense]] =
 
==Creation==
 
==Properties==
 
* {get} long [[CALicense::AvailableLicenseInstances|AvailableLicenseInstances]]
 
* {get} BOOL [[CALicense::CanUseOptimizer|MaxLicenseInstances]]
 
* {get} short int [[CALicense::ErrorCode|ErrorCode]]
 
* {get} string [[CALicense::ErrorText|ErrorText]]
 
* {get} long [[CALicense::MaxLicenseInstances|MaxLicenseInstances]]
 
 
 
==Methods==
 
* [[CAEngine]] [[CALicense::NewCAEngine|NewCAEngine]]()
 
* void [[CALicense::SetApplicationLicenseCode|SetApplicationLicenseCode]](string)
 
 
 
= See Also =
 
 
 
* [[:Category:ADE Classes]]
 
* [[:Category:ADE Methods]]
 
* [[:Category:Typescript Commands]]
 
* [[Analytica Scripting Guide]]
 

Latest revision as of 02:49, 2 June 2015

Comments


You are not allowed to post comments.