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
 Read col index

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
dominik.mierzwa Posted - 05/31/2021 : 1:51:06 PM
Origin Ver. and Service Release (Select Help-->About Origin): 2021b
Operating System: W10

Hi,
How to get the index of the column with LT? I would like to use function for particular column and need to get one parameter from a long name of this column e.g. col(1)[L] but I would like to get more universal function which will work with any column (read the index of the column before script execution).

Kind regards,
Dominik
4   L A T E S T    R E P L I E S    (Newest First)
dominik.mierzwa Posted - 06/01/2021 : 10:26:48 AM
No way, I have tried this but forgot to add $ at the end.... Thank you :)

Kind regards,
Dominik
YimingChen Posted - 06/01/2021 : 10:01:17 AM
Use this:
string str1 = wcol(j)[L]$


James
dominik.mierzwa Posted - 06/01/2021 : 09:44:22 AM
I need to get the variable (string) from a long name of a column in which I introduce the formula e.g. for col(A) I'm using Before script formula:
string str1=col(A)[L]$  OR
string str1=col(1)[L]$


But it forces me to define the column name/index (A or 1). I would like to have a script that read the column index and put it into the definition. For example in col(C) it will automatically change the index for 3:

string str1=col(C)[L]$  OR
string str1=col(3)[L]$


In this scenario I do not need to worry about the column index, it always read the index of a particular column.


Kind regards,
Dominik
YimingChen Posted - 06/01/2021 : 08:57:54 AM
Not quite sure about your question. Do you want to get the column index from column short name? If so, try:
colNum(C)=


James

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