CAEngine::CreateObject
(Redirected from CreateObject)
ADE User Guide > ADE Server Class Reference > CAEngine
CreateObject(objName,objClass)
Creates a new Analytica object with identifier «objName» and class «objClass» in the CurrentModule and returns it as a CAObject.
Parameters
- objName
- string - the new object's identifier
- objClass
- string, one of:
- "Alias"
- "Attribute"
- "Button"
- "Chance"
- "Constant"
- "Decision"
- "Determ"
- "Form"
- "Formnode"
- "Function"
- "GraphStyleTemplate"
- "Index"
- "Library"
- "LinkLibrary"
- "LinkModule"
- "Model"
- "Module"
- "Objective"
- "Picture"
- "Text"
- "Variable"
Return value
Example Usage
// C# CAObject obj = ade.CreateObject ("NewVar","Chance");
API errors
- 40 – “Object could not be created”
- 41 – “Invalid name for object”
- 42 – “Object name already in use”
- 48 – “Invalid object class”
Comments
Enable comment auto-refresher