Difference between revisions of "CAObject::CreateDefTable/zh"

(Created page with "Boolean(布尔值):成功的话为'''True'''。")
 
(4 intermediate revisions by the same user not shown)
Line 5: Line 5:
 
= bool CreateDefTable(indexList) =
 
= bool CreateDefTable(indexList) =
  
Creates an input table object in the definition attribute of the specified Analytica object with
+
在指定Analytica对象的属性中建立一个输入表格对象,维度指定为indexList。indexList参数必须包含一个由现有索引标量标识符组成的数组(形式与CATable类型IndexNames方法相同)。
dimension specified by the indexList. The IndexList parameter must contain an array of identifiers
+
indexList中索引的数量决定表格的维数。其中一个索引可以是Self,意味着其中一个维度被该变量的Indexvals属性索引,应该是该数组中的条目之一。最初,输入表格对象的数组元素都为null(空值),可以使用CATable类型的etDataByElements和SetDataByLabels改变。
of existing index variables (identical in form to the IndexNames method of class CATable).
 
The number of indexes in indexList determines the number of dimensions of the table. One
 
index can be Self, meaning that one of the dimensions are indexed by the Indexvals attribute of
 
this variable. should be one of the entries in the array. Initially, the input table object’s array is filled
 
with null elements, which can be changed using the SetDataByElements and SetDataByLabels
 
methods of the class CATable.
 
  
 
== 参 数 ==
 
== 参 数 ==
Line 22: Line 16:
 
Boolean(布尔值):成功的话为'''True'''。
 
Boolean(布尔值):成功的话为'''True'''。
  
See [[CAEngine::ErrorCode|ErrorCode]] and [[CAEngine::ErrorText|ErrorText]] for information about why it failed.
+
关于失败的原因,请参考[[CAEngine::ErrorCode/zh|ErrorCode]][[CAEngine::ErrorText/zh|ErrorText]]
  
 
= 用法 =
 
= 用法 =
Line 28: Line 22:
 
== C# ==
 
== C# ==
  
  [[CAObject]] x = ade.[[CAEngine::Get|Get]]("X");
+
  [[CAObject/zh|CAObject]] x = ade.[[CAEngine::GetObjectByName/zh|Get]]("X");
 
  string [] indexList = new string[3]{"I","J","K"};
 
  string [] indexList = new string[3]{"I","J","K"};
 
  if (!x.CreateDefTable(indexList)) {
 
  if (!x.CreateDefTable(indexList)) {
     MessageBox.Show(ade.[[CAEngine::ErrorText|ErrorText]],"Error creating table", MessageBoxButtons.Ok);
+
     MessageBox.Show(ade.[[CAEngine::ErrorText/zh|ErrorText]],"Error creating table", MessageBoxButtons.Ok);
 
     return;
 
     return;
 
  }
 
  }

Latest revision as of 14:07, 23 October 2015

ADE User Guide > ADE Server Class Reference > CAObject

Other languages:
English • ‎中文

bool CreateDefTable(indexList)

在指定Analytica对象的属性中建立一个输入表格对象,维度指定为indexList。indexList参数必须包含一个由现有索引标量标识符组成的数组(形式与CATable类型IndexNames方法相同)。 indexList中索引的数量决定表格的维数。其中一个索引可以是Self,意味着其中一个维度被该变量的Indexvals属性索引,应该是该数组中的条目之一。最初,输入表格对象的数组元素都为null(空值),可以使用CATable类型的etDataByElements和SetDataByLabels改变。

参 数

«indexList»:一个1维字符串安全数组,包含的名称将作为表格的索引。

返回值

Boolean(布尔值):成功的话为True

关于失败的原因,请参考ErrorCodeErrorText

用法

C#

CAObject x = ade.Get("X");
string [] indexList = new string[3]{"I","J","K"};
if (!x.CreateDefTable(indexList)) {
   MessageBox.Show(ade.ErrorText,"Error creating table", MessageBoxButtons.Ok);
   return;
}
...

另请参考

Comments


You are not allowed to post comments.