Difference between revisions of "CATable::GetDataByLabels/zh"

(Created page with ":24 – “下标必须是一个变体数组” :25 – “下标无法访问” :26 – “数组下界无法访问” :27 – “数组上界无法访问” :28 – “必...")
(Created page with "根据«indexLabels»检索输入表格单元的值,«indexLabels»按顺序指明表格中每个索引的标签。")
Line 4: Line 4:
 
= [[CATable/zh | CATable]]::GetDataByLabels(indexLabels) =
 
= [[CATable/zh | CATable]]::GetDataByLabels(indexLabels) =
  
Retrieves the value of an input table cell according to «indexLabels», which specify the label for each index of the table in order.
+
根据«indexLabels»检索输入表格单元的值,«indexLabels»按顺序指明表格中每个索引的标签。
  
 
The parameter specifies the coordinates of a cell in the table, using the index labels ([[CATable::GetDataByElements]] does the same using index position).  When the table is one dimensional, indexLabels can be a single value -- a text value when the index is a list-of-labels, or a number when the index is a numeric list.  Otherwise, indexLabels must be an array with ''N'' elements when the table is ''N''-dimensional.
 
The parameter specifies the coordinates of a cell in the table, using the index labels ([[CATable::GetDataByElements]] does the same using index position).  When the table is one dimensional, indexLabels can be a single value -- a text value when the index is a list-of-labels, or a number when the index is a numeric list.  Otherwise, indexLabels must be an array with ''N'' elements when the table is ''N''-dimensional.

Revision as of 08:53, 17 October 2015

ADE User Guide > ADE Server Class Reference > CATable

Other languages:
English • ‎中文

CATable::GetDataByLabels(indexLabels)

根据«indexLabels»检索输入表格单元的值,«indexLabels»按顺序指明表格中每个索引的标签。

The parameter specifies the coordinates of a cell in the table, using the index labels (CATable::GetDataByElements does the same using index position). When the table is one dimensional, indexLabels can be a single value -- a text value when the index is a list-of-labels, or a number when the index is a numeric list. Otherwise, indexLabels must be an array with N elements when the table is N-dimensional.

The order of the dimensions, as they are listed in «indexLabels», is determined by a previous call to CATable::SetIndexOrder.

The return value is the value of the table cell. The manner in which this value is returned is determined by the CATable::RenderingStyle.

When the result table is zero-dimensional (i.e., atomic, not an array), you must use CATable::AtomicValue to access the value.

示例

在VB中

dim editTab as CATable = var2d.DefTable
dim indexLabs(1)   ' Contains two elements, (0) and (1)
indexLabs(0) = 3
indexLabs(1) = "green"
editTab.SetIndexOrder( Split("I,J",",") )

ET = editTab.GetDataByLabels(indexLabs)
dim resTab as CATable = var2d.ResultTable
resTab.SetIndexOrder( Split("I,J",","))
RT = resultTab.GetDataByLabels(indexLabs)
RT1 = var1d.ResultTable.GetDataByLabels("red")

错误代码

24 – “下标必须是一个变体数组”
25 – “下标无法访问”
26 – “数组下界无法访问”
27 – “数组上界无法访问”
28 – “必须最少指定表格中的一个元素”
30 – “位置不存在”

另请参考

Comments


You are not allowed to post comments.