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

(Created page with "CATable::GetDataByElements")
 
 
(18 intermediate revisions by the same user not shown)
Line 2: Line 2:
 
[[ADE User Guide]] > [[ADE Server Class Reference]] > [[CATable]]
 
[[ADE User Guide]] > [[ADE Server Class Reference]] > [[CATable]]
 
<languages />
 
<languages />
= [[CATable]]::GetDataByElements(indexPositions) =
+
= [[CATable/zh | CATable]]::GetDataByElements(indexPositions) =
  
Retrieves the value of an input table cell according to «indexPositions», which specify the 1-based position along each index of the table in order.
+
根据«indexPositions»检索输入表格单元的值,«indexPositions»沿表格中索顺序指明位置(从1开始)。
  
The parameter specifies the coordinates of a cell in the table, using the position along the index, with position 1 being the first element([[CATable::GetDataByLabels]] does the same using index labels).  When the table is one dimensional, «indexPositions» be a single interger value.  Otherwise, «indexPositions» must be an array with ''N'' numbers when the table is ''N''-dimensional.
+
此参数通过使用索引方向上的位置说明表格单元的坐标,position 1为第一个元素位置([[CATable::GetDataByLabels/zh|CATable::GetDataByLabels]]通过使用索引标签来实现)。当表格位1维时,«indexPositions»必须是一个整数值。否则,«indexPositions»必须是一个包含''N''个数的数组(表格维度为''N'')。
  
The order of the dimensions, as they are listed in «indexPositions», is determined by a previous call to [[CATable::SetIndexOrder]].
+
维度的顺序,同它们在«indexPositions»中所列出一样,由前面调用[[CATable::SetIndexOrder/zh|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]].  
+
返回值是表格单元的值。该值返回的方式由[[CATable::RenderingStyle]]决定。  
  
When the result table is zero-dimensional (i.e., atomic, not an array), you must use [[CATable::AtomicValue]] to access the value.
+
当结果表是零维度时(也就是说,一个基元值,非数组),你必须使用[[CATable::AtomicValue/zh|CATable::AtomicValue]]来访问并获取该值。
  
= Examples =
+
= 示例 =
  
== In VB ==
+
==在VB中 ==
  
 
  dim editTab as CATable = var2d.DefTable
 
  dim editTab as CATable = var2d.DefTable
Line 33: Line 33:
 
  RT1 = var1d.ResultTable.GetDataByElements(4)
 
  RT1 = var1d.ResultTable.GetDataByElements(4)
  
= Error Codes =
+
= 错误代码 =
  
:24 – “Subscripts must be an array of variants”
+
:24 – “下标必须是一个变体数组”
:25 – “Subscripts cannot be accessed”
+
:25 – “下标无法访问”
:26 – “Lower bound of subscript array inaccessible”
+
:26 – “数组下界无法访问”
:27 – “Upper bound of subscript array inaccessible”
+
:27 – “数组上界无法访问”
:28 – “Must specify at least one element in table”
+
:28 – “必须最少指定表格中的一个元素”
:30 – “Position does not exist”
+
:30 – “位置不存在”
  
= See Also =
+
= 另请参考 =
  
* [[CATable::SetIndexOrder]]
+
* [[CATable::SetIndexOrder/zh|CATable::SetIndexOrder]]
* [[CATable::RenderingStyle]] and [[CARenderingStyle]]
+
* [[CATable::RenderingStyle]][[CARenderingStyle/zh|CARenderingStyle]]
* [[CATable::SetDataByElements]]
+
* [[CATable::GetDataByElements/zh|CATable::GetDataByElements]]
* [[CATable::AtomicValue]]
+
* [[CATable::AtomicValue/zh|CATable::AtomicValue]]
* [[CATable::GetSafeArray]]
+
* [[CATable::GetSafeArray/zh|CATable::GetSafeArray]]
* [[CATable::GetDataByLabels]] and [[CATable::SetDataByLabels]]
+
* [[CATable::SetDataByLabels/zh|CATable::SetDataByLabels]][[CATable::SetDataByElements/zh|CATable::SetDataByElements]]
* [[CATable::Subscript]] and [[CATable::Slice]]
+
* [[CATable::Subscript/zh|CATable::Subscript]][[CATable::Slice/zh|CATable::Slice]]

Latest revision as of 08:58, 26 October 2015

ADE User Guide > ADE Server Class Reference > CATable

Other languages:
English • ‎中文

CATable::GetDataByElements(indexPositions)

根据«indexPositions»检索输入表格单元的值,«indexPositions»沿表格中索顺序指明位置(从1开始)。

此参数通过使用索引方向上的位置说明表格单元的坐标,position 1为第一个元素位置(CATable::GetDataByLabels通过使用索引标签来实现)。当表格位1维时,«indexPositions»必须是一个整数值。否则,«indexPositions»必须是一个包含N个数的数组(表格维度为N)。

维度的顺序,同它们在«indexPositions»中所列出一样,由前面调用CATable::SetIndexOrder决定。

返回值是表格单元的值。该值返回的方式由CATable::RenderingStyle决定。

当结果表是零维度时(也就是说,一个基元值,非数组),你必须使用CATable::AtomicValue来访问并获取该值。

示例

在VB中

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

ET = editTab.GetDataByElements(coord)
dim resTab as CATable = var2d.ResultTable
resTab.SetIndexOrder( Split("I,J",","))
RT = resultTab.GetDataByElements(coord)
RT1 = var1d.ResultTable.GetDataByElements(4)

错误代码

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

另请参考

Comments


You are not allowed to post comments.