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
 Origin Forum
 Setting Long names in Collumn

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
thentangler Posted - 07/30/2010 : 12:29:10 AM
Origin Ver.8.1 SR3
Operating System: Win 7

Hi,
I have a problem setting Long Names in my columns. I have a huge amount of data and plan to do some preliminary calculations while importing.
I use the Labtalk script while importing.
I have two columns A and B in ascii files. I create a new column C while importing and assign Col(C)=abs(Col(B));
But I want to assign a Long Name to Column C so that When i plot it I can automatically use it int he legend.
Any Help will be greatly appreciated.
Thanks
7   L A T E S T    R E P L I E S    (Newest First)
dimidola Posted - 02/23/2011 : 10:43:48 AM
Oh my! it works like a charm!
vincenth Posted - 02/02/2011 : 1:21:59 PM
Hi,

Try the following:

col(a)[L]$ = "peak@(" + col(c)[1]$ + "," + col(d)[1]$ + ")";

You can simply "add"/concatenate the string elements together with the + operator, putting literals in quotes.

Regards,
Vince
OriginLab Corp.
dimidola Posted - 01/30/2011 : 06:07:19 AM
quote:
Originally posted by greg

You can use this

col(C)[L]$ = col(C)[1]$; // $ implies string value



Thanks! it works!
so, can I get my longname to be two different values from my worksheet, or have a name and a value?

like if I have
col(a): response: 1 2 3 4 5 4 3 2 1 0
col(b): time: 1 2 3 4 5 6 7 8 9 10
col(c): peak response: 5
col(d): time at peak response: 5

and I want to have my col(a) longname set to: "peak@(5,5)"

so, I'd expect it to be like:
col(a)[L]$ = "peak@(" col(c)[1]$ "," col(d)[1]$ ")"

but of course (since I know so little about scripts) it doesn't work...

thanks a million!
greg Posted - 01/28/2011 : 1:15:37 PM
You can use this

col(C)[L]$ = col(C)[1]$; // $ implies string value
This notation is preferred over
wks.col3.label$ = col(C)[1]$
or
wks.col$(colnum(C)).label$ = col(C)[1]$

If your entire first row is actually text that you want to use for Long Names, then consider modifying the import to put that row into Long Name rather than data. You can also use

wrow2label longname:=1;

which is equivalent to selecting row 1, right-clicking and choosing Set as Long Name.
dimidola Posted - 01/27/2011 : 06:15:08 AM
Is there a way to set the long name of a column as a value from the workbook?

ie. if col(c)[1] contains the name of the experiment and after some processing I got my results to col(d) and I want to name col(d) as whatever is written in col(c)[1]

thank you!!!
thentangler Posted - 08/05/2010 : 02:42:06 AM
Hi Applenano,
Thank you so much for the reply.
It works like a charm
applenano Posted - 07/30/2010 : 02:58:42 AM
Hi Thentangler,

The following LabTalk script can be used to set the long name of the third column:
wks.col3.label$=your long name;
You can see more details in this page:
http://wiki.originlab.com/~originla/wiki/index.php?title=LabTalk:Wks.Col_%28object%29

Best Regards
Alex


OriginLab Technical Services

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