CAEngine::CreateObject

This page is a translated version of the page CAEngine::CreateObject and the translation is 100% complete.

ADE User Guide > ADE Server Class Reference > CAEngine

Other languages:
English • ‎中文

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(變量)"

返回值

CAObject

示例用法

// C#
CAObject obj = ade.CreateObject ("NewVar","Chance");


API 錯誤

  • 40 – 「對象不能建立」
  • 41 – 「對象名稱無效」
  • 42 – 「對象名稱已存在」
  • 48 – 「無效對象類型」
Comments


You are not allowed to post comments.