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 for Programming
 LabTalk Forum
 Setting type for column without using col number

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
Nilsdalby Posted - 12/13/2014 : 10:39:30 AM
Origin 8.6, windows 8.

Hi

This is most likely a very minor syntax detail, but:

Im trying to set type for a column to X (type = 4)in a script. However, the column has a name (ValuepA), not a number, and all examples ive seen of this require the column to be adressed with an integer.

How can i 1) get the col no, or UID of that column from the present string, or 2) use the string-name to set type ?

Thanks, Nils
1   L A T E S T    R E P L I E S    (Newest First)
cpyang Posted - 12/13/2014 : 12:08:56 PM
Use the range notation, like this:


range myCol=col("Measurement Time");
myCol.type=4;



Basically, LabTalk object column can be accessed either using the wks.coln notation, or you define a range variable to refer to it.
Range variable allows you to refer to a column in any book sheet, like:

range AA=[book3]"Experiement A"!col("Start Time");


CP

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