T O P I C R E V I E W |
saschia |
Posted - 05/07/2010 : 09:17:19 AM Origin Ver. and Service Release (Select Help-->About Origin): Operating System: Origin 7,0 Pro, SR4
Hi,
I am having problem with this script:
void AdjustImage (string ImgWksName, int ColFirst = 0, int ColLast = 15, int Delay = 12) { // line 66 string EdImgName = "Ed" + ImgWksName; Worksheet EdImage; Worksheet wksSource(ImgWksName); EdImage.CreateCopy(wksSource, CREATE_VISIBLE_SAME); // line 71 EdImage.GetPage().Rename(EdImgName); double Blank = CalculateBlank(EdImgName, ColFirst, ColLast); foreach(Column ImgCol in EdImage.Columns) { Dataset ImgDs; ImgDs.Attach(ImgCol); ImgDs = ImgDs - Blank; double F0 = CalculateF0(ImgDs, Delay); ImgDs = ImgDs / F0; } }
The function compiles fine, linking is done, but when I run it from the script window, I get this message:
AdjustImage ("Data1", 0, 26, 24); failed to find object during method call failed to find object during method call #Command Error!
And the compiler shows this message:
E:\Origin Files\Spike - primary analysis\uprava_obrazku.c(71) :Origin C Function Runtime Error, failed to find object during method call E:\Origin Files\Spike - primary analysis\uprava_obrazku.c(66) :Origin C Function Runtime Error, failed to find object during method call
So I know that line 71 generates this error, but I cannot find the reason and I cannot find any relevant topic for this error message.
Thanks for advice!
Sasha
|
3 L A T E S T R E P L I E S (Newest First) |
saschia |
Posted - 05/10/2010 : 06:28:50 AM Found the problem. Obvious, but hart to spot on Friday evening ;o).
I called the function with the space between the function name and the parentheses...
|
Penn |
Posted - 05/09/2010 : 10:01:22 PM Hi Sasha,
From the error information, a nonexistent object was using during calling this method. The error is come from line 71 in your issue. So, please make sure that the variable wksSource stands for a valid object (a worksheet), that is the worksheet named ImgWksName must exist.
Penn |
saschia |
Posted - 05/07/2010 : 09:19:40 AM Sorry, Origin Version 7.0 Pro, SR4 OS version Windows XP, SP2 |
|
|