| 
        
          | 
              
                | T O P I C    R E V I E W |  
                | Mulvenna | Posted - 08/16/2013 : 08:47:01 AM Hi,
 
 I currently have a script that outputs about 30 pdfs. I am trying to minimize the length of the script. A huge portion is taken up by making and filling tables for each output file even though there are actually only three different tables.
 
 Is there a way of creating a table, saving it and simply inserting it when required instead of having to remake the table every time?
 
 Thanks
 |  
                | 1   L A T E S T    R E P L I E S    (Newest First) |  
                | greg | Posted - 08/26/2013 : 10:05:49 AM Since table objects on a graph create a link to an actual Worksheet, it would be problematic to add the same link to multiple graphs.
 
 Maybe having the code to create a table, position it and fill the values would be useful:
 
 // This creates the table object on your graph
 add_table_to_graph cols:=3 rows:=2 title:="My Table 1" tab:=tablename$;
 // Sample positioning - top left of layer
 %(tablename$).x = X1 + %(tablename$).DX / 2;
 %(tablename$).y = Y2 - %(tablename$).DY / 2;
 // Get named object into shorter string register
 %A = tablename$;
 // Now fill the table
 for(tcol = 1;tcol <= 3;tcol++)
 {
 for(trow = 1;trow <= 2;trow++)
 {
 %B = Row $(trow), Col $(tcol);
 %A!cell(trow,tcol)$=%B;
 }
 }
 // Refresh
 doc -uw;
 
 |  |  
 |