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
 Import assistant Labtalk code

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
ClemensObergfell Posted - 12/02/2014 : 04:47:26 AM
Origin Ver. and Service Release (Select Help-->About Origin): 9.0.0 G (32-Bit) SR1
Operating System: Windows 7 Enterprise

Dear Origin-Support team!

I have a still unsolved problem.
I'm asking again from this thread:

http://www.originlab.com/forum/topic.asp?TOPIC_ID=20111

I have now added integrations of the imported columns and wanted to get the max values of the "Integrated Y1" to "Integrated Y5" columns in the same style as before.

I have this script now but I don't get any values in the new column "Bruchenergie". What could I change to make it work?

wks.addcol();
wcol(wks.ncols)[L]$ = Max Werte;
row = 1;
loop(ii,1,wks.ncols-1)
{
str$ = wks.col$(ii).lname$;
if(str.Left(5)$==Kraft)
{
col(Max Werte)[row] = max(wcol(ii));
row++;
}
}
;
integ1 iy:=(Col(2), Col(1));
integ1 iy:=(Col(4), Col(3));
integ1 iy:=(Col(6), Col(5));
integ1 iy:=(Col(8), Col(7));
integ1 iy:=(Col(10), Col(9));
wks.addcol();
wcol(wks.ncols)[L]$ = Bruchenergie;
row = 1;
loop(ii,1,wks.ncols-1)
{
str$ = wks.col$(ii).lname$;
if(str.Left(5)$==Integrated Y)
{
col(Bruchenergie)[row] = max(wcol(ii));
row++;
}
}
plotxy iy:=((2,1),(4,3),(6,5),(8,7),(10,9)) plot:=202;

Do I have to rename the variables for the second time it goes through the loop(ii,1,wks.ncols-1) part?

Thank you very much in advance.

Greetings, Clemens
2   L A T E S T    R E P L I E S    (Newest First)
ClemensObergfell Posted - 12/04/2014 : 01:28:06 AM
I have changed the "5" to "12" and added this "" to Integrated Y and now I get the values.

Thanks again for your help!

As you said it, it's easy to overlook such things if you're not too familiar with coding in general...

Thank you :)
cdrozdowski111 Posted - 12/02/2014 : 06:59:17 AM
Notice that in your second loop() command, you check to see if the first 5 characters in the column long name == Integrated Y. Of course, there are more than 5 characters in Integrated Y. You need to increase the number of characters checked. It's easy to overlook such things :)

Maybe this solves your problem?


str$ = wks.col$(ii).lname$;
if(str.Left(5)$==Integrated Y) // <-- change 5 to 12
{
col(Bruchenergie)[row] = max(wcol(ii));
row++;
}


BTW, it is generally good practice to put strings that have spaces in them, e.g. Integrated Y, in quotes, e.g. "Integrated Y". While it may not be the case with your particular code, having the space in a string can cause problems in other types of code.

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