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
 x-function for labeling headers

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
annaoj2 Posted - 05/08/2009 : 9:36:54 PM
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!
1   L A T E S T    R E P L I E S    (Newest First)
Laurie Posted - 05/11/2009 : 12:01:09 PM
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

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