List of channels in a database
edited March 1
I'm looking for advice on how to get a list of the channel names in a database - using C++ in a standalone application.
Thanks in anticipation!
Did you found the solution?
On my side, I'm using .NET library directly in Montaj. It's not the same as C++ but it must very look like:
//Create a Database and List object
CDB db = CDB.Open("[database name.gdb]", "SUPER", "");
CLST list_of_channels = CLST.Create(db.iChansMax());
//Load channels in list
//Iterate through list object to extract channels name
for(int i = 0; i < list_of_channels.iSize(); i++)
//Load the item name in tmp, LST_ITEMConstant.VALUE is an integer representing the channel type
string tmp = "";
list_of_channels.GtItem(LST_ITEMConstant.NAME, i, ref tmp);
// Don't forget to dispose your objects
That's great - thanks Guillaume. I've managed to get something similar working. Brian
AGS Res2DInv & Res3DInv
Seequent Community Instructions