CAEngine::CreateObject
ADE User Guide > ADE Server Class Reference > CAEngine
CreateObject(objName,objClass)
在CurrentModule当中建立一个标识符为«objName»,类型为«objClass»的新Analytica对象,并作为一个CAObject返回。
参 数
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"
返回值
示例用法
// 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