File Exchange
Try Origin for Free
The Origin Forum
Home
|
Profile
|
Register
|
Active Topics
|
Members
|
Search
|
FAQ
|
Send File to Tech support
Username:
Password:
Save Password
Forgot your Password?
|
Admin Options
All Forums
Origin Forum for Programming
LabTalk Forum
Compress csetvalue
New Topic
Reply to Topic
Printer Friendly
Author
Topic
Force
Denmark
9 Posts
Posted - 11/19/2014 : 05:29:14 AM
Origin Ver. and Service Release (Select Help-->About Origin): 9.1Pro
Operating System: windows7
Hi,
I need to remove several data point from each row if data are missing in a col(14) of the same row number. It works when I use the following:
%A = %H;
window -a %A;
%B = page.active$;
csetvalue col:=[%A]%B!col(3) Formula:="col(14)==NANUM?--:col(3)" recalculate:=0;
csetvalue col:=[%A]%B!col(4) Formula:="col(14)==NANUM?--:col(4)" recalculate:=0;
csetvalue col:=[%A]%B!col(5) Formula:="col(14)==NANUM?--:col(5)" recalculate:=0;
csetvalue col:=[%A]%B!col(6) Formula:="col(14)==NANUM?--:col(6)" recalculate:=0;
csetvalue col:=[%A]%B!col(7) Formula:="col(14)==NANUM?--:col(7)" recalculate:=0;
csetvalue col:=[%A]%B!col(8) Formula:="col(14)==NANUM?--:col(8)" recalculate:=0;
csetvalue col:=[%A]%B!col(9) Formula:="col(14)==NANUM?--:col(9)" recalculate:=0;
csetvalue col:=[%A]%B!col(10) Formula:="col(14)==NANUM?--:col(10)" recalculate:=0;
However, the script buffer is almost full so I am looking for a way to write all the csetvalue-command in a more compressed way. Is there any way to do so?
/Frantz
lkb0221
China
497 Posts
Posted - 11/19/2014 : 11:13:47 AM
for (int ii = 3; ii <= 10; ii++) {
csetvalue col:=col($(ii)) Formula:="col(14)==NA()? NA():col($(ii))" recalculate:=0;
}
Because the target worksheet is already activated, so there is no %A and %B needed for range declaration.
Force
Denmark
9 Posts
Posted - 11/19/2014 : 5:26:03 PM
Thank you IKB0221.
That works for me.
Topic
New Topic
Reply to Topic
Printer Friendly
Jump To:
Select Forum
Origin Forum
Origin Viewer Forum
Origin Forum
Origin Forum for Programming
Forum for Python
LabTalk Forum
Forum for Origin C
Forum for Automation Server/COM and LabVIEW
Origin中文论坛
Origin 中文论坛 (Chinese Origin Forum)
Japanese Origin Forum
Origin日本語フォーラム (Japanese Origin Forum)
Origin on Linux
The Origin on Linux Forum
Private Forums
Distributor Forum
--------------------
Home
Active Topics
Frequently Asked Questions
Member Information
Search Page
The Origin Forum
© 2020 Originlab Corporation
Snitz Forums 2000