Cancel
Showing results for 
Search instead for 
Did you mean: 

Read/Write to Tablefile Element (in column) which is datatype table

Legend
Legend

Hi all,

 

I like to have one column in a Maintablefile to have the format table.

 

How can I write to the elements ?

I tried to write all data to a tablefile buffer first and copy this one into the maintablefile element.

I get error "Wrong data type in .Model..Frame.MainTableFile: object passed, table expected".

 

 

Regards

Marco

 

2 REPLIES 2

Re: Read/Write to Tablefile Element (in column) which is datatype table

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

if the first column is the table then you access to each table with

 

mainTable[1,row]

 

to access the first cell in the subtable

 

mainTable[1,row][1,1]

 

you may copy data into the sub-table e.g. with

 

tableFile.copyRangeTo({1,1}..{*,*},mainTable[1,row],1,1)

Steffen Bangsow
freelance simulation specialist  
web: www.bangsow.eu
mail: steffen@bangsow.net

Re: Read/Write to Tablefile Element (in column) which is datatype table

Legend
Legend

OK, thanks I use this one: mainTable[iCol,row][iCol2,iRow2]

and loop through all table variables.

 

Regards

Marco