Author |
Topic |
|
annaoj2
USA
1 Posts |
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! |
|
Laurie
USA
404 Posts |
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 |
|
|
|
Topic |
|
|
|