RobotStudio event

Multidimensional arrays

Hi all,



I'm currently trying to read one dimension of a multi-dimensional array and write it to a dimension of another multi-dimensional variable.



Example

READING the first dimension of nZone1PckTab

Local PERS num nZone1PckTab{2,3,2}:=[[[0,0],[0,0],[2,2]],[[0,0],[0,0],[2,2]]];



WRITING it to the first dimension of nCtxZone1PckTab

PERS num nCtxZone1PckTab{3,3,2}:=[[[0,0],[0,0],[2,2]],[[0,0],[0,0],[2,2]],[[0,0],[0,0],[2,2]]];



Question :

1- Is there any way of retrieving just one dimension in a multi-dimensional array ? (I suppose no since ReadItem seems not to accept this) Or I have to do it manually ?



2- Is there any way of getting the number of items in each dimension (I could not find this anywhere, and it does not appear in the help of RAP5.07, but it would be very very useful !!!)



Regards to all,

Antoine

Comments

  • Hi again,



    Otherwise the only solutions I have is to manipulate strings, manually calculate dimensions. This is both very inefficient in terms of string manipulations when you have a lot of variables to deal with, and time consuming for writing the code.



    It seems incredible to me not to have access to such basic properties that give the dimensions and number of elements of arrays as available with WebWare SDK (S4Array when using multidimensional arrays - NumDimensions and ElementSize methods).

    Will this feature be enabled in RAB 5.07 ?



    Regards,

    Antoine