CAEngine::CreateObject
ADE User Guide > ADE Server Class Reference > CAEngine
CreateObject(objName,objClass)
在 CurrentModule(当前模块)当中建立一个标识符为«objName»,类型为«objClass»的新Analytica对象,并作为一个 CAObject返回。
参 数
objName:string(字符串)——新对象的标识符
- objClass:string(字符串),以下之一“
- "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 错误
- 40 – “对象不能建立”
- 41 – “对象名称无效”
- 42 – “对象名称已存在”
- 48 – “无效对象类型”
Comments
Enable comment auto-refresher