Hello Bob,
 
One way to do this is to call the SymbLST_DB function to get a list of DB_SYMB_LINE objects, sort the list of lines using Sort_LST, then go through the list in order.  You get the line symbol from the value part of the LST as a number string and cast the converted value to a line symbol to get the line, something like (untested):
 
hLST = Create_LST(127);
SymbLST_DB(hDB,hLST,DB_SYMB_LINE);
Sort_LST(hLST,0,0);
 
iLines = iSize_LST(hLST);
for (iLine=0;iLine<iLines;iLine++) {
 
    GetItem_LST(hLST,1,iLine,sLine)
    hLine = (DB_SYMB)iScan_STR(sLine);
 
    ...
 
}
 
Regards,
Ian

_______________
Geosoft Inc.
Ian MacLeod
[EMAIL PROTECTED]
(416) 369 0111 x323

Software and services for effective earth science decision-making.
Free Oasis montaj interface now available at http://www.geosoft.com

-----Original Message-----
From: Ellis, Robert RG [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 16, 2001 4:00 PM
To: [EMAIL PROTECTED]
Subject: [geonet]: Lines extracted in random order?

Hi,

 

I am extracting data from a gdb in a standalone C program using the prototype code:

 

   hLine = FirstSelLine_DB(pGeo,&hDB);

   do {

      if (!iIsLineValid_DB(pGeo,&hDB,&hLine)) break;

      iLineN = iLineNumber_DB(pGeo,&hDB,&hLine);

 

      ….some processing ….

 

      hLine = NextSelLine_DB(pGeo,&hDB,_l(hLine));

   } while (1);

 

The problem is that the lines are extracted in “random” order and not sequentially with respect to line number. Is there a method for extracting the lines in sequential line number order?

 

Thanks in advance for any help,

 

Regards,

Rob

 

Robert G Ellis

Minerals Discovery Group, BHP World Exploration Inc.

1111 West Georgia Street, Suite 1400

Vancouver, BC, Canada, V6E 4M3

Telephone: (direct) 604 632 1470  (reception) 604 632 1450 Fax: 604 683 4125

EMAIL: [EMAIL PROTECTED]

 

 

Reply via email to