Hello,

Has anyone successfully used the above function?

I'm having a hell of a time of it. The following code is from a Delphi program, but 
I'm sure it's easy enough to follow...

     hLine2 := DupSymb_DB(hGeo,hData,hLine,sLine2);
     if (iCheckError_SYS(hGeo) = 1) then raise Exception.create('Problem 
             creating line2 symbol');
     LockSymb_DB(hGeo,hData,hLine2,DB_LOCK_READWRITE,
             DB_WAIT_INFINITY);
     if (iCheckError_SYS(hGeo) = 1) then raise Exception.create
              ('Problem locking line2');
     if (iIsLineValid_DB(hGeo,hData,hLine) = 1) AND 
            (iIsLineValid_DB(hGeo,hData,hLine2)= 1) then
     SplitLine_DU(hGeo,hData,hLine,hLine2,rFid);
     if (iCheckError_SYS(hGeo) = 1) then raise Exception.create
            ('Problem splitting line2 ');
     UnLockSymb_DB(hGeo,hData,hLine2);
     if (iCheckError_SYS(hGeo) = 1) then raise Exception.create('Problem unlocking 
line2');

This code ALWAYS raises the "Problem splitting line 2" exception. The line referred to 
by hLine is locked elsewhere, and the value of rFid is valid.

For reference, the following code (reformatted a bit for brevity) is from the 
Spltline.gx, 

    InLn = FindSymb_DB(Data,sInLn,DB_SYMB_LINE);
    // --- Does the Ouput Line Exist ? ---
    if (!iExistSymb_DB(Data,sOutLn,DB_SYMB_LINE)) {
       OutLn = DupSymb_DB(Data,InLn,sOutLn);
       UnLockSymb_DB(Data,OutLn);
    }
    else 
       OutLn = FindSymb_DB(Data,sOutLn,DB_SYMB_LINE);
    // --- Lock the Line symbols ---
    if (InLn == OutLn) Abort_SYS("Input and Output lines cannot be the same");
    LockSymb_DB(Data,InLn,DB_LOCK_READWRITE,DB_WAIT_INFINITY);
   LockSymb_DB(Data,OutLn,DB_LOCK_READWRITE,DB_WAIT_INFINITY);
    SplitLine_DU(Data,InLn,OutLn,rFid);

One noteable difference is that InLn isn't locked when the line is duped, and OutLn is 
unlocked then locked, but I've tried every locking/unlocking combination and that 
didn't help. Other than that I can't see anything different that I'm doing.

Any help or insight gratefully received..

Marc Pelletier

---------------------------------------------------------------------------
Data Donkey - Geophysical Data Processing, Consulting and Software Development
                Creator of the POWER TOOLBOX utilities for OASIS montaj
contact: mailto:[EMAIL PROTECTED]  tel (306) 931-6853 or http://www.datadonkey.com

_______________________________________________________
More mailing list info http://www.geosoft.com/support/listserv/index.html

Reply via email to