CATable::SetDataByElements
ADE User Guide > ADE Server Class Reference > CATable
CATable::SetDataByElements(x,indexPositions)
将坐标«indexPositions»上的输入表格单元格的值设定为一个新的值«x»。«IndexPositions»按照顺序沿表格的每个索引指明基于1的位置(第一个索引元素位置为1)。
The «indexPositions» parameter specifies the coordinates of a cell in the table, using the position along the index, with position 1 being the first element(CATable::SetDataByLabels does the same using index labels). When the table is one dimensional, «indexPositions» must be a single interger value. Otherwise, «indexPositions» must be an array with N numbers when the table is N-dimensional.
The order of the dimensions, as they are listed in «indexPositions», is determined by a previous call to CATable::SetIndexOrder.
The return value is a Boolean indicating success (true) or failure (false).
示例
在VB中
dim editTab as CATable = var2d.DefTable
dim coord(1) ' 包含两个元素(0)和(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 – “位置不存在”
Enable comment auto-refresher