List of channels in a database
BrianMinty
Posts: 3
Hello
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!
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!
0
Comments
-
Hi Brian,
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
db.GetChanOrderLST(list_of_channels);
//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
CDB.Dispose();
CLST.Dispose();0 -
That's great - thanks Guillaume. I've managed to get something similar working. Brian0
Categories
- All Categories
- 302 Community
- 3 Get Started
- 17 Latest Releases
- 16 Member Spotlight
- 42 Learning
- 1.1K Products
- 565 Geology
- 538 Leapfrog
- 1 Volsung
- 26 Visible Geology
- 36 Data Management & Collaboration
- 14 MX Deposit
- 13 Central
- 9 Imago
- 137 Geotechnical
- 137 GeoStudio
- 332 Geophysics
- 321 Oasis montaj
- 1 Workbench
- SPIA
- 10 Res2DInv & Res3DInv
- 3 Evo
- 27 GX Developer