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
 Forum for Origin C
 Failed to evaluate the fft1 X-Function.
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

thebigpeeler

United Kingdom
11 Posts

Posted - 06/27/2013 :  05:38:51 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Hey guys, im trying to get this code to work, but so far its failing at the end when i execute the X-function, i also get the error code:

fft1:X-Function failed to execute!
Internal error code: -898, -45

Cheers in advance guys!

void CallFFT()
{
// Load the X-Function
string strXFNameToCall = "fft1";
XFBase xf(strXFNameToCall);
if( !xf.IsValid() )
{
out_str("Failed to load xfunction.");
return;
}

// Set the arguments for the X-Function

string strFilename = "Col(1)";
if( !xf.SetArg("ix", strFilename) )
out_str("Failed to set argument filename");


// With arguments set we can now execute the X-Function
if( !xf.Evaluate() )
{
out_str("Failed to evaluate the getnlr X-Function.");
return;
}
}

:D

Edited by - thebigpeeler on 06/27/2013 05:52:42 AM

thebigpeeler

United Kingdom
11 Posts

Posted - 06/27/2013 :  06:05:54 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
I think it has something to do with the Col(1), it works if i type fft ix:=Col(1) into the script window directly, but not as an argument in Origin C


:D
Go to Top of Page

thebigpeeler

United Kingdom
11 Posts

Posted - 06/27/2013 :  10:42:41 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Ok so ive narrowed it down to either the ix, rd and rt arguments that are the issue, every other argument works. when i run the script without them it puts the data and graph into the same workbook in two different sheets which is great.

But i want to specify which column to fft first, and so id like to be able to use the ix argument, when i try to input an argument (not knowing he syntax to use yet) it looks as if it creates a new book, but then it disappears and the error message appears:

fft1:X-Function failed to execute!
Internal error code: -898, -45

Go to Top of Page

ZanHUNG

20 Posts

Posted - 06/27/2013 :  12:07:18 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
//if( !xf.SetArg("ix", strFilename) )
if( !xf.SetVarData("ix", strFilename) )
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