Cancel
Showing results for 
Search instead for 
Did you mean: 

table - get specific row Xdim

Builder
Builder

in the actual version there´s the code to identify the Dim of an specific column: table.getcolumnYdim(x);

can we expect to have another code to identify Dim of some specific row for next software version?

table.getrowXdim(x);

 

2 REPLIES 2

Betreff: table - get specific row Xdim

Siemens Phenom Siemens Phenom
Siemens Phenom

Hello Ricardo,

The tables in Plant Simulation have a column vector for each column. So it's easy and fast to get the size of such a column vector, since the vector knows its size.

 

To get the right most cell with a content in a row we would have to implement something like this:

param aTable:any, row:integer -> integer

var maxCol:integer := aTable.xdim

for var i := maxCol downto 1
	if aTable[i, row] /= void
		return i
	end
next

return 0

Usually we try to avoid implementing methods with a complexity which is not expected by the user to avoid slow performance. So at the moment there is no plan to implement this function.

 

Do you need it often?

Regards,

Ralf
------------------------------------------------------------------------------------------------------
Did you like the answer? Then click the Thumbs Up button.
Did the answer solve your problem? Then accept the answer as solution.

Betreff: table - get specific row Xdim

Builder
Builder

We use to explore the use of tables and sometimes we miss that kind of command. When it happens we create codes similar to example that you have shown.

If there´s a row vector it would simplify.