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
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum
 Origin Forum
 Setting Long names in Collumn
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

thentangler

USA
Posts

Posted - 07/30/2010 :  12:29:10 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
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

applenano

China
9 Posts

Posted - 07/30/2010 :  02:58:42 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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
Go to Top of Page

thentangler

USA
Posts

Posted - 08/05/2010 :  02:42:06 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Applenano,
Thank you so much for the reply.
It works like a charm
Go to Top of Page

dimidola

Switzerland
Posts

Posted - 01/27/2011 :  06:15:08 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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!!!
Go to Top of Page

greg

USA
1378 Posts

Posted - 01/28/2011 :  1:15:37 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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.
Go to Top of Page

dimidola

Switzerland
Posts

Posted - 01/30/2011 :  06:07:19 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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!
Go to Top of Page

vincenth

30 Posts

Posted - 02/02/2011 :  1:21:59 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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.

Edited by - vincenth on 02/03/2011 09:38:53 AM
Go to Top of Page

dimidola

Switzerland
Posts

Posted - 02/23/2011 :  10:43:48 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Oh my! it works like a charm!
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000