T O P I C R E V I E W |
thebigpeeler |
Posted - 06/27/2013 : 05:38:51 AM 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 |
3 L A T E S T R E P L I E S (Newest First) |
ZanHUNG |
Posted - 06/27/2013 : 12:07:18 PM //if( !xf.SetArg("ix", strFilename) ) if( !xf.SetVarData("ix", strFilename) ) |
thebigpeeler |
Posted - 06/27/2013 : 10:42:41 AM 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
|
thebigpeeler |
Posted - 06/27/2013 : 06:05:54 AM 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 |
|
|