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
 x-function for labeling headers
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

annaoj2

USA
1 Posts

Posted - 05/08/2009 :  9:36:54 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver. and Service Release (Select Help-->About Origin): 8
Operating System: XP

Hi,

I am trying to fill in header information for columns I've created using x-functions.

For example, I am creating a new column from existing columns, such as:
col(sample Moment) = col(Total Moment) - col(Substrate Moment)

This would add a new column with Long Name "sample Moment", and would fill in the calculated data, but how do I fill in the rest of the header (Units, Comments)? This might not exist, but I can't figure out how to even access the header of a specified column if I need to make my own x-function for this.

Also using this method to create a new column results in the name "sample Moment" being used as a Long Name, but if assigned a one-word name, this column is added with the label as a Short Name and with the Long Name empty. How do I specify whether I'm naming Long vs. Short Name?

Thanks!

Laurie

USA
404 Posts

Posted - 05/11/2009 :  12:01:09 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
A two-word name can only be a long name, meaning a short name cannot have spaces in it; a short name also has other character restrictions. I'd recommend not renaming the short name.

Here's a short LabTalk script:

wks.addcol(); //add a new column, with default short name
wcol(wks.ncols) = col(Total Moment) - col(Substrate Moment);
wcol(wks.ncols)[L]$ = "Sample Moment";
wcol(wks.ncols)[U]$ = "Some Unit";
wcol(wks.ncols)[C]$ = "Some Comment";

wks.ncols returns the number of columns in the active worksheet

OriginLab Technical Support
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