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
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum for Programming
 LabTalk Forum
 External call execution error
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

adamleewiner

China
Posts

Posted - 07/21/2008 :  12:42:01 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
this is the script,sometimes it works,but most the time an error happened,printed in the command window is "External call execution error"and in the code builder:"C:\Program Files\OriginLab\Origin8\OriginC\OriginLab\EVENT_UTILS.C(2123) :Origin C Function Runtime Error, External call execution error";

please help!

win -a tc;//active the workbook named tc
maxrows=wks.maxrows;
set %h -b 0;
set %h -e 10;
loop (ii,3,17)
{%n=wks.col$(ii).name$;
interp1 ix:=%n_height iy:=(col(2),wcol(ii)) ox:=%n_a;
};

set %h -b 11;
set %h -e 19;
loop (ii,3,17)
{%n=wks.col$(ii).name$;
interp1 ix:=%n_height iy:=(col(2),wcol(ii)) ox:=%n_c;
};

set %h -b 20;
set %h -e 26;
loop (ii,3,17)
{%n=wks.col$(ii).name$;
interp1 ix:=%n_height iy:=(col(2),wcol(ii)) ox:=%n_b;
};

set %h -b 0;
set %h -e maxrows;

VincentLiu

China
Posts

Posted - 07/22/2008 :  10:58:41 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi LEE,

We haven't seen your data, so we don't know what the problem exactly was. Your problem may come from the line "ix:=%n_height". In Origin, you can use "BookName_ColumnShortName" to represent the dataset. So %n needs to be a name of a workbook. You may modify the line "%n=wks.col$(ii).name$" to "%n = %H" to see if this can work.

If this can not solve your problem, please send your data or .opj file to tech@originlab.com. And please also paste the following linking in your email. http://www.originlab.com/forum/topic.asp?TOPIC_ID=7212.


Best regards,
Vincent
OriginLab Technical Services
Go to Top of Page

adamleewiner

China
Posts

Posted - 07/23/2008 :  04:44:48 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
{%n=wks.col$(ii).name$; here %n contains the existing workbook name that is created based on the colume name of the acitve workbook.
i think there are no problems in the script lines because this script file runs smoothly sometimes.
a problem i found is some of the x-functions like interp1 or integ1 don't work well in the script files. ARE THERE ANY WAY TO SOLVE THE PORBELM
PS could i use the special execution syntex ";" before a xfuncton line as:
;interp1 ix:=%n_height iy:=(col(2),wcol(ii)) ox:=%n_c;
ADAM
лл

quote:
Originally posted by VincentLiu

Hi LEE,

We haven't seen your data, so we don't know what the problem exactly was. Your problem may come from the line "ix:=%n_height". In Origin, you can use "BookName_ColumnShortName" to represent the dataset. So %n needs to be a name of a workbook. You may modify the line "%n=wks.col$(ii).name$" to "%n = %H" to see if this can work.

If this can not solve your problem, please send your data or .opj file to tech@originlab.com. And please also paste the following linking in your email. http://www.originlab.com/forum/topic.asp?TOPIC_ID=7212.


Best regards,
Vincent
OriginLab Technical Services


Go to Top of Page

larry_lan

China
Posts

Posted - 07/23/2008 :  05:43:33 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
You'd better send your OPJ, or we cannot reproduce your problem.
Go to Top of Page

cpyang

USA
1406 Posts

Posted - 07/23/2008 :  8:52:54 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Best to write script with range notation to use in xf like interp1.

%n_coname type of notation is not reliable.

CP
Go to Top of Page

adamleewiner

China
Posts

Posted - 07/25/2008 :  07:40:38 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
thanks, Yang.
I will try that.
quote:
Originally posted by cpyang

Best to write script with range notation to use in xf like interp1.

%n_coname type of notation is not reliable.

CP




An USTCer always keep trying.
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000