Addressing cells programmatically

6.43K viewsScripting

I fear I am missing something obvious here – so apologies if this is a stupid question…

I can explicitly reference a subset of cells within a matrix as e.g. |Matrix1::A1:B1| – but how do I achieve the same with script variables?

|Matrix1|.categories[0].items[0].values=1 achieves the same as
|Matrix1::A1|.values =1

but how do I achieve the equivalent of
|Matrix1::A1:B1|.values =1

A separate (but I suspect related) question/issue – I can’t find any way to iterate over a set of cells, for example to check which have a certain value, and then find the Item values for those cells. (I have a workaround for this by creating a “shadow” matrix with calculated items containing the @id values, building parallel arrays of the values and the ids, checking the value list and then indexing into the id list – but that seems very convoluted!

And under all this I wonder if the issue is that the scripting engine doesn’t expose a “cell” object – which is what I would want to iterate over.

I thought the cellsOnly attribute on an Item might be the answer (“Gets the cells for this item, excluding the item itself.”), but that seems to return just the Item name. How is that supposed to be used?



Hi Ben,

Many thanks for coming up with this topic again. Unfortunately, I don’t have the time now to explain why I need this functionality but I can describe my reasons next week.

The very short version:
It is mainly for implementing Linear Algebra in Quantrix. I don’t have the need to get the coordinates of a cell in multi-dim matrix (multi-dim: > 2). But I am sure this will be useful for other use cases.


You are viewing 1 out of 7 answers, click here to view all answers.