T O P I C R E V I E W |
deepakdinakaran |
Posted - 01/16/2019 : 10:51:36 AM Origin Ver. and Service Release (Select Help-->About Origin): Origin 2018 SR1 Operating System:Windows 8.1
Hello, I use the following script to rearrange data from sheet 1 to Device1,Device2 (newly created sheets). Now, I would like to do the same thing but I would like to insert the data from sheet 1 into userParameter rows as in sheet2.
I tried using wks.UserParam1=1; to create a userparameter row but I could not used it inside the for loop.
range asheet=[%H]$(page.active); nc=wks.nCols; nr=wks.maxRows; for(ir=1;ir<=nr;ir++){ bauteil$=asheet!col(1)[ir]$; newsheet name:=bauteil$; range ss = [%H]bauteil$!wcol(2); for(ii=1,ic=2;ii<=(nc-1) && ic<=nc;ii++,ic++){ tem$=asheet!wcol(ic)[L]$; ss!col(A)[ii]$=tem$; ss[C]$=bauteil$; ss[ii]$=asheet!wcol(ic)[ir]$; } }
Thanks in advance. Best regards, Deepak
 |
4 L A T E S T R E P L I E S (Newest First) |
deepakdinakaran |
Posted - 01/18/2019 : 05:11:07 AM Hi Yuki,
Perfect. It worked. Thank you.
Regards, Deepak
quote: Originally posted by yuki_wu
Hi Deepak,
You are quite close to the answer, you could use the script like:
loop(ii, 1, 5) { wks.userParam$(ii)=1; }
Hope it helps.
Regards, Yuki
OriginLab
|
yuki_wu |
Posted - 01/18/2019 : 04:04:57 AM Hi Deepak,
You are quite close to the answer, you could use the script like:
loop(ii, 1, 5) { wks.userParam$(ii)=1; }
Hope it helps.
Regards, Yuki
OriginLab
|
deepakdinakaran |
Posted - 01/17/2019 : 07:47:42 AM Hi Yuki,
Thanks for your suggestion. I think the page you suggested only explains about creating a userparameter row (command is wks.UserParam1=1;) but i am interested in doing the same inside a for loop. I want to create n number of userparamter rows depending on the iteration.
For example, if we assume the command for creating userparameter row is wks.UserParam[ii]=1, i can use this inside a for loop for creating n number of userparameters rows. But since the command is wks.UserParameter1=1 (this command creates a single row), is there other ways to use them inside a for loop ?
Thanks and best regards, Deepak
quote: Originally posted by yuki_wu
Hi Deepak,
Please try to take a look at this page, it should help: https://www.originlab.com/doc/LabTalk/guide/Accessing-Metadata#Read.2FWrite_Column_Label_Rows
Regards, Yuki
OriginLab
|
yuki_wu |
Posted - 01/16/2019 : 10:06:15 PM Hi Deepak,
Please try to take a look at this page, it should help: https://www.originlab.com/doc/LabTalk/guide/Accessing-Metadata#Read.2FWrite_Column_Label_Rows
Regards, Yuki
OriginLab
|
|
|