The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
 All Forums
 Origin Forum for Programming
 LabTalk Forum
 Save a Table to be Used in Multiple Graphs

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

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;

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000