PDA

View Full Version : Loading data into MLGrid Control



RADRAD
08-05-2013, 06:45
I am new to thinbasic and am still evaluating its functionality as to suitability for my purposes.

I am wanting to find out if the only way of loading data into the MLgrid is by using the MLGrid_Put command?

Elsewhere on this forum i saw an example which parsed the FILE_Load(FileName) command to load data into an array.
Can this be used to load the underlying array of the ML Grid?

ErosOlmi
08-05-2013, 07:20
Hi RADRAD,

welcome to thinBasic community forum.

Yes, actually the only way to insert data into a MLGrid is using MLGrid_Put function.
But if there is an interest, I can develop other ways, for example using arrays/bulk cells filling.
If you can give a little more details I will see if I can develop some new general purpose functions on loading data.

Ciao
Eros

LCSims
12-05-2013, 02:24
Greets Eros,

If I might offer a couple of thought/examples? My work has slowed some, due to health matters, but I'm trying to get things going again. And working with MLGrid would be a part of my efforts.

Since I deal with elevation data and that data is formatted in a row/column manner, it's suited for work in MLGrid. But the data is dynamic in size and can come from 1 to 4 files, so I would be filling an array first. Once that array is filled, it would be nice to have a simplified call to MLGrid that would size it's array and populate the data. Something like MLGrid_Grab, which would be fed the array name and would recognize the array dimensions and I should correctly (?) refer to the array as a matrix, since it's multi-dimensional, then once MLGrid is sized all the matrix's data is read and placed into MLGrid. Then going back the other way, once I am through working the data in MLGrid, having a MLGrid_Store to move the contents back into the matrix.

As I understand the workings now, I would have nested loops going into MLGrid and back out of MLGrid to accomplish the transfer of data. That's OK, except when my loops get out of whack and I spend time fixing my boo-boo's.

If I can get the "most important" sub-routine to work, then I can develop the tools that will be using MLGrid. And there will almost certainly be a whole lot of questions when I get to that point!

Thanks,

Lance

ErosOlmi
12-05-2013, 16:44
Thanks Lance,

I think I can do something on this side.

Eros