GXDH class

class geosoft.gxapi.GXDH
This class is used for importing and interacting with Drill Hole
data files. For detailed information on Drill Hole data,
see the documentation for Wholeplot.

Note:

The DH class has some defines not used by any functions.
    DH_DEFINE_PLAN constant
    DH_DEFINE_SECT constants
add_hole((str)arg1) → int:
Add a hole and return it's index.
Parameters:arg1 (str) – Name of hole
Returns:x - Hole index
Return type:int

New in version 5.0.0.

add_survey_table((int)arg1) → None:
Add a survey table for a new hole.
Parameters:arg1 (int) – Hole index
Returns:Nothing
Return type:None

New in version 5.1.8.

Note:

The information is created from the collar table info.
If the survey info already exists, does nothing.
assay_hole_lst((int)arg1, (GXLST)arg2) → None:
Populate an LST with holes in an assay database
Parameters:
Returns:

Nothing

Return type:

None

New in version 6.3.0.

assay_lst((GXLST)arg1) → None:
Return the LST of from-to and point assay datasets
Parameters:arg1 (geosoft.gxapi.GXLST) – LST to be populated
Returns:Nothing
Return type:None

New in version 5.1.8.

Note:

Assay dataset name is given as LST_ITEM_NAME
Assay dataset number is given as LST_ITEM_VALUE
Returns an empty LST if no datasets.
static auto_select_holes((int)arg1) → None:
Use automatic hole selection based on slice.
Parameters:arg1 (int) – Turn on (TRUE) or off (FALSE)
Returns:Nothing
Return type:None

New in version 5.0.0.

chan_type((str)arg1) → int:
Return the data type for a channel code.
Parameters:arg1 (str) – Channel code
Returns:Channel data type
Return type:int

New in version 7.0.0.

Note:

Finds and sorts all the unique non-dummy items for the selected channel.
clean() → None:
Delete extraneous holes from project databases.
Returns:Nothing
Return type:None

New in version 5.1.2.

Note:

Removes from Project databases any lines not connected to
a line found in the collar table list.
If all the database lines would be removed, the database is
simply deleted.
clean_will_delete_db() → int:
See if "cleaning" will delete project databases.
Returns:1 if calling Clean_DH will remove all “lines” from one of the DH project databases.
Return type:int

New in version 5.1.2.

composite_db((GXDB)arg1, (GXDB)arg2, (int)arg3, (int)arg4, (float)arg5, (str)arg6, (str)arg7, (str)arg8, (float)arg9, (float)arg10, (float)arg11, (int)arg12, (str)arg13) → None:
Make a composite database
Parameters:
  • arg1 (geosoft.gxapi.GXDB) – Input assay DB object
  • arg2 (geosoft.gxapi.GXDB) – output composite DB object
  • arg3 (int) – DH_COMPSTDB_HOLSEL constants
  • arg4 (int) – DH_COMPSTDB_INTSEL constants
  • arg5 (float) – fixed interval length
  • arg6 (str) – name of lithology cannel
  • arg7 (str) – name of interval file
  • arg8 (str) – name of Weight channel
  • arg9 (float) – dRej1Val for intervals short than, (GS_R8DM for no action)
  • arg10 (float) – dRej2Val for intervals gap greater than, (GS_R8DM for no action)
  • arg11 (float) – dRej3Val for Rej3Ch with Rej3Op, (GS_R8DM for no action)
  • arg12 (int) – dRej3Op: 0: >, 1: >=, 2: <, 3: <=
  • arg13 (str) – name of Rej3Ch channel
Returns:

Nothing

Return type:

None

New in version 5.1.8.

compositing_tool_gui((GXMAP)arg1, (float)arg2, (float)arg3, (float)arg4) → int:
Annotate a strip log map using the compositing tool.
Parameters:
  • arg1 (geosoft.gxapi.GXMAP) – Current strip log map
  • arg2 (float) – X location on map of selected strip
  • arg3 (float) – Y End of hole interval in view coords
  • arg4 (float) – Y Other end of hole interval in view coords
Returns:

DH_COMP_CHOICE constants

Return type:

int

New in version 5.1.3.

Note:

If any of the input X or Y values are dummies the tool uses default values.
compute_hole_xyz((int)arg1) → None:
Computes XYZ for survey and assay data for a single hole.
Parameters:arg1 (int) – Hole index
Returns:Nothing
Return type:None

New in version 7.3.0.

compute_sel_extent((float_ref)arg1, (float_ref)arg2, (float_ref)arg3, (float_ref)arg4, (float_ref)arg5, (float_ref)arg6) → None:
Computes the extents for selected holes.
Parameters:
Returns:

Nothing

Return type:

None

New in version 5.0.0.

compute_xyz() → None:
Computes XYZ for survey and assay data.
Returns:Nothing
Return type:None

New in version 5.1.2.

static convert_old_line_names((GXDB)arg1, (GXLST)arg2) → None:
Convert old "DD001.Assay" type lines to "DD001"
Parameters:
Returns:

Nothing

Return type:

None

New in version 6.3.0.

Note:

The input LST must be filled using a function like geosoft.gxapi.GXDB.symb_lst(), which
puts the name and symbol into the LST items.
Any names with a period are truncated at the period, and
the line name in the database is changed to the new name
(just the hole name).
The LST is modified to have the new names.
A value is put into the DB REG "DH_CONVERTED_NAMES" parameter so
this process is done only once on a database.

DO NOT use on old-style single-database Wholeplot projects.
creat_chan_lst((GXLST)arg1) → None:
Fills a LST with available string and numeric channel code values.
Parameters:arg1 (geosoft.gxapi.GXLST) – LST to fill with channel code values.
Returns:Nothing
Return type:None

New in version 5.1.8.

Note:

Channel codes are in the format "[Assay] Au", where the name in
the square brackets is descriptive part of the project database
containing the given channel name. The above code might refer to
the "Au" channel in the "Tutorial_Assay.gdb" database.
static create((str)arg1) → GXDH:
Create DH.
Parameters:arg1 (str) – Name of current database
Returns:DH Object
Return type:geosoft.gxapi.GXDH

New in version 5.0.0.

static create_collar_table((str)arg1, (int)arg2, (str_ref)arg3) → None:
Create a collar table DB with channels set up.
Parameters:
  • arg1 (str) – Project name
  • arg2 (int) – Number of channels
  • arg3 (geosoft.gxapi.str_ref) – Collar table name (returned)
Returns:

Nothing

Return type:

None

New in version 5.1.6.

Note:

The database name will be of the form

"d:directoryProject_Collar.gdb"
static create_collar_table_dir((str)arg1, (str)arg2, (int)arg3, (str_ref)arg4) → None:
Create a collar table in the specified directory.
Parameters:
  • arg1 (str) – Project name
  • arg2 (str) – Directory to create project in
  • arg3 (int) – Number of channels
  • arg4 (geosoft.gxapi.str_ref) – Collar table name (returned)
Returns:

Nothing

Return type:

None

New in version 5.1.8.

Note:

The database name will be of the form

"d:directoryProject_Collar.gdb"
create_default_job((str)arg1, (int)arg2) → None:
Create a default job from scratch.
Parameters:
  • arg1 (str) – File name of the INI file to create (forces correct suffix)
  • arg2 (int) – DH_PLOT constants
Returns:

Nothing

Return type:

None

New in version 5.1.2.

static create_external((str)arg1) → GXDH:
Create a DH from an external process (no montaj running).
Parameters:arg1 (str) – Name of example project database
Returns:DH Object
Return type:geosoft.gxapi.GXDH

New in version 5.1.6.

Note:

The regular geosoft.gxapi.GXDH.create() assumes a workspace is open and creates
the project from the databases which are currently loaded.
This function instead creates the project from all projects
in the input databases's directory.
static current() → GXDH:
Creates a drill project from current environment.
Returns:DH Object
Return type:geosoft.gxapi.GXDH

New in version 6.1.0.

Note:

If no DH database is open the Open DH Project GUI will be displayed which may be
cancelled by the user in which case the GX will terminate with cancel.
static datamine_to_csv((str)arg1, (str)arg2) → None:
Convert a Datamine drillhole file to CSV files ready for import.
Parameters:
  • arg1 (str) – Datamine database file to import (*.dm)
  • arg2 (str) – Drillhole project name
Returns:

Nothing

Return type:

None

New in version 6.3.0.

Note:

Creates three CSV files and the accompanying template files
ready for batch ASCII import into a drill project.
   Project_Collar.csv, .i3
   Project_Survey.csv, .i3
   Project_Assay.csv,  .i3
delete_holes((GXLST)arg1) → None:
Delete a list of holes from the project.
Parameters:arg1 (geosoft.gxapi.GXLST) – LST of holes to delete
Returns:Nothing
Return type:None

New in version 5.1.2.

Note:

Removes all lines in the input LST from DH project databases.
If all the database lines would be removed, the database is
simply deleted.
delete_will_delete_db((GXLST)arg1) → int:
See if deleting holes will delete project databases.
Parameters:arg1 (geosoft.gxapi.GXLST) – LST of holes to delete
Returns:1 if deleting the LST of holes will remove all “lines” from one of the DH project databases.
Return type:int

New in version 5.1.2.

depth_data_lst((GXLST)arg1) → None:
Fills a LST with available channel code values from Depth databases.
Parameters:arg1 (geosoft.gxapi.GXLST) – LST to fill with channel code values.
Returns:Nothing
Return type:None

New in version 6.4.0.

Note:

Channel codes are in the format "[Assay] Au", where the name in
the square brackets is descriptive part of the project database
containing the given channel name. The above code might refer to
the "Au" channel in the "Tutorial_Assay.gdb" database.
export_file((str)arg1, (int)arg2) → None:
Exports a Drill Hole database to an external file.
Parameters:
Returns:

Nothing

Return type:

None

New in version 5.0.0.

export_geodatabase_lst((GXLST)arg1, (str)arg2, (str)arg3, (str_ref)arg4, (bool)arg5) → None:
Exports whole or part of a Drill Hole database to an ArcGIS Geodatabase as feature class(es).
Parameters:
  • arg1 (geosoft.gxapi.GXLST) – Hole Names in the Name and Value parts of the LST
  • arg2 (str) – File name (.pdb folder for File Geodatabase or .sde connector for SDE)
  • arg3 (str) – String to prefix dataset names with
  • arg4 (geosoft.gxapi.str_ref) – Feature class name to export (pass empty for all or name of table, will contain the name of the output dataset for if a rename occurs)
  • arg5 (bool) – bool Overwrite existing feature classes? Pass False to create copies.
Returns:

Nothing

Return type:

None

New in version 7.1.0.

Note:

A table with metadata about the created feature classes will be written to the Geodatabase. This table will have the same
name with the postfix "_Metadata" attached
export_las((int)arg1, (int)arg2, (float)arg3, (str)arg4) → None:
Exports a Drill Hole database to a LAS v2 file.
Parameters:
  • arg1 (int) – Assay database index
  • arg2 (int) – Hole index
  • arg3 (float) – Interval for output
  • arg4 (str) – File name
Returns:

Nothing

Return type:

None

New in version 5.1.8.

export_lst((GXLST)arg1, (str)arg2, (int)arg3) → None:
Exports a LST of holes in a Drill Hole database to an external file.
Parameters:
Returns:

Nothing

Return type:

None

New in version 5.1.8.

Note:

Use functions like geosoft.gxapi.GXDB.selected_line_lst() to construct the LST
find_hole((str)arg1) → int:
Find a hole and return it's index.
Parameters:arg1 (str) – Name of hole
Returns:x - Hole index -1 - Not found
Return type:int

New in version 5.0.0.

find_hole_intersection((int)arg1, (GXIMG)arg2, (float_ref)arg3, (float_ref)arg4, (float_ref)arg5) → int:
Return XYZ locations of the intersection of a hole with a DEM grid.
Parameters:
Returns:

1 if intersection found 0 if no intersection found

Return type:

int

New in version 7.0.0.

Note:

Input the hole index and an IMG object. Returns XYZ location
of the hole intersection with the DEM. Interpolation inside the DEM
uses the native IMG interp method. If no intersection is found the
returned XYZ locations are rDUMMY.
flush_select() → None:
Flush all selections to database selection engine.
Returns:Nothing
Return type:None

New in version 5.0.0.

from_to_data_lst((str)arg1, (GXLST)arg2) → None:
Fills a LST with available string and numeric channel code values from From-To databases.
Parameters:
  • arg1 (str) – Assay dataset (“” for all)
  • arg2 (geosoft.gxapi.GXLST) – LST to fill with channel code values.
Returns:

Nothing

Return type:

None

New in version 6.4.0.

Note:

Channel codes are in the format "[Assay] Au", where the name in
the square brackets is descriptive part of the project database
containing the given channel name. The above code might refer to
the "Au" channel in the "Tutorial_Assay.gdb" database.
get_chan_code_info((str)arg1, (int_ref)arg2, (str_ref)arg3) → None:
Return the assay database index and channel name from a channel code string.
Parameters:
Returns:

Nothing

Return type:

None

New in version 7.3.0.

Note:

The input channel code is in the form "[Assay] channel"
get_collar_table_db((str_ref)arg1) → None:
Get the name of the database containing the collar table.
Parameters:arg1 (geosoft.gxapi.str_ref) – returned file name
Returns:Nothing
Return type:None

New in version 5.1.2.

get_data_type((GXDB)arg1, (int_ref)arg2) → None:
Get the type of data in a Wholeplot database.
Parameters:
Returns:

Nothing

Return type:

None

New in version 5.1.3.

Note:

Returns DH_DATA_UNKNOWN if it can't determine the type.
get_databases_sorted_vv((GXVV)arg1) → None:
Get the names of the project databases in a VV, same as geosoft.gxapi.GXDH.get_databases_vv() but the list is sorted alphabetically.
Parameters:arg1 (geosoft.gxapi.GXVV) – VV of type -STR_FILE
Returns:Nothing
Return type:None

New in version 8.2.0.

get_databases_vv((GXVV)arg1) → None:
Get the names of the project databases in a VV.
Parameters:arg1 (geosoft.gxapi.GXVV) – VV of type -STR_FILE
Returns:Nothing
Return type:None

New in version 5.1.2.

get_default_section((float_ref)arg1, (float_ref)arg2, (float_ref)arg3, (float_ref)arg4, (float_ref)arg5) → None:
Computes default section azimuths, extents for selected holes.
Parameters:
Returns:

Nothing

Return type:

None

New in version 5.0.0.

get_geology_contacts((GXLST)arg1, (str)arg2, (str)arg3, (int)arg4, (float)arg5, (GXVV)arg6, (GXVV)arg7, (GXVV)arg8) → None:
Return XYZ locations of top or bottom geological surfaces
Parameters:
Returns:

Nothing

Return type:

None

New in version 7.0.0.

Note:

For the input LST of holes, returns XYZ location of top or bottom
contact with the input geology. Those selected holes which do NOT
have contacts, return rDUMMY for the corresponding locations.
get_hole_group((int)arg1, (str)arg2) → int:
Get the Group symbol for this hole/table combination.
Parameters:
  • arg1 (int) – Hole index
  • arg2 (str) – Table Name
Returns:

Hole Symbol

Return type:

int

New in version 5.0.0.

get_hole_survey((int)arg1, (GXVV)arg2, (GXVV)arg3, (GXVV)arg4, (GXVV)arg5) → None:
Get the Survey information of a Hole.
Parameters:
Returns:

Nothing

Return type:

None

New in version 5.0.0.

get_info((int)arg1, (str)arg2, (str_ref)arg3) → None:
Get Collar Information.
Parameters:
  • arg1 (int) – hole index
  • arg2 (str) – Name of information
  • arg3 (geosoft.gxapi.str_ref) – buffer to place information
Returns:

Nothing

Return type:

None

New in version 5.0.0.

Note:

If the DH_ELEV channel is requested it will also
search for the DH_RL channel, which is the new
name for the collar elevation.
get_ipj((GXIPJ)arg1) → None:
Get the project IPJ.
Parameters:arg1 (geosoft.gxapi.GXIPJ) – IPJ Handle
Returns:Nothing
Return type:None

New in version 5.1.8.

Note:

The projection for the project is the projection stored
in the DH_EAST channel in the collar table.
get_map((int)arg1) → GXMAP:
Get a plotting map
Parameters:arg1 (int) – Map Index
Returns:MAP Object
Return type:geosoft.gxapi.GXMAP

New in version 8.0.1.

get_map_names_vv((GXVV)arg1) → None:
Get plotted map names.
Parameters:arg1 (geosoft.gxapi.GXVV) – returned map names (string type VV)
Returns:Nothing
Return type:None

New in version 5.1.8.

Note:

This will return the currently plotted map name(s)
in a VV. This should only be called after a call
to geosoft.gxapi.GXDH.wholeplot(). The VV size is set to the number
of maps created.
get_num_maps() → int:
Get the number plotting maps
Returns:Number of plotting maps
Return type:int

New in version 8.0.1.

get_oriented_core_dip_dir((GXLST)arg1, (str)arg2, (str)arg3, (int)arg4, (str)arg5, (str)arg6) → None:
Converted alpha/beta values in oriented cores to dip/dip direction.
Parameters:
  • arg1 (geosoft.gxapi.GXLST) – List of holes to process (e.g. from HoleLST_DH)
  • arg2 (str) – Channel code for input alpha data
  • arg3 (str) – Channel code for input beta data
  • arg4 (int) – 1: Top of core reference 0: Bottom of core reference
  • arg5 (str) – Channel name for output dip data
  • arg6 (str) – Channel name for output dip direction
Returns:

Nothing

Return type:

None

New in version 6.4.0.

Note:

The input data are the oriented core alpha and beta values, using either
top or bottom reference. The values for each hole in the LST are converted
to "absolute" dip and dip-direction values, using the resurveyed hole
orientations at each depth.
The alpha and beta data must be from the same database, and the output
dip and dip/dir channels are written to the same database.
get_project_name((str_ref)arg1) → None:
Get the Wholeplot project name.
Parameters:arg1 (geosoft.gxapi.str_ref) – returned string
Returns:Nothing
Return type:None

New in version 5.1.2.

get_reg() → GXREG:
Get the REG Object used in this project.
Returns:REG Object
Return type:geosoft.gxapi.GXREG

New in version 5.0.0.

static get_section_id((float)arg1, (float)arg2, (float)arg3, (str_ref)arg4) → None:
Create a section ID based on its location
Parameters:
  • arg1 (float) – Section Azimuth
  • arg2 (float) – Section Easting
  • arg3 (float) – Section Northing
  • arg4 (geosoft.gxapi.str_ref) – Section ID
Returns:

Nothing

Return type:

None

New in version 6.1.0.

get_selected_holes_vv((GXVV)arg1) → None:
Populate a VV with the indices of all selected holes
Parameters:arg1 (geosoft.gxapi.GXVV) – Returned hole indices (must be type INT)
Returns:Nothing
Return type:None

New in version 8.0.0.

static get_table_default_chan_lst((GXLST)arg1, (int)arg2) → None:
Return list of default channels by collar/assay/survey table type.
Parameters:
Returns:

Nothing

Return type:

None

New in version 7.3.0.

Note:

Fills a LST with the default channel names created according to
type (Collar, Survey, Assay). Value is in the LST_ITEM_NAME part.
static get_template_blob((GXDB)arg1, (str)arg2, (int_ref)arg3) → int:
Retrieve the import template from the database.
Parameters:
Returns:

0: No template stored in the database 1: Template retrieved and written to a file.

Return type:

int

New in version 6.0.0.

Note:

The template can be retrieved in order to refresh the
database with a call to the DHIMPORT.GX.

The import types correspond to the DHIMPORT.IMPTYPE variable:
0: ASCII, 1: Database/XLS, 2: ODBC

If no template blob exists, templ
static get_template_info((str)arg1, (int_ref)arg2, (str_ref)arg3, (str_ref)arg4) → None:
Retrieve the file, DH Table name and type from an import template.
Parameters:
Returns:

Nothing

Return type:

None

New in version 6.0.0.

Note:

As of version 6.0, the import templates (*.i3, *.i4) produced
by the Wholeplot import wizards contain the following lines:

 FILE assay.txt  (except for ODBC)
 DRILLTYPE 3
 DRILLTABLE Assay

The FILE is normally the input file name, except for ODBC, where it
is not defined.
The DRILLTYPE is one of DH_DATA_XXX, and the DRILLTABLE
is the name of the Wholeplot database table; e.g. Project_Assay.gdb
in the above case. The DRILLTABLE is only included in the template
for DH_DATA_FROMTO and DH_DATA_POINT, but this function will
return the appropriate table names (e.g. Collar, Survey, ENSurvey)
for the other types.
If the DRILLTYPE is NOT found in the template, a value of
DH_DATA_UNKNOWN is returned for the data type; likely an indication that this
is not a new-style template produced by Wholeplot.
static get_template_info_ex((str)arg1, (int_ref)arg2, (str_ref)arg3, (str_ref)arg4, (GXLST)arg5) → None:
Retrieve the file, DH Table name, type and channel list from an import template.
Parameters:
Returns:

Nothing

Return type:

None

New in version 7.3.0.

Note:

As of version 6.0, the import templates (*.i3, *.i4) produced
by the Wholeplot import wizards contain the following lines:

 FILE assay.txt  (except for ODBC)
 DRILLTYPE 3
 DRILLTABLE Assay

The FILE is normally the input file name, except for ODBC, where it
is not defined.
The DRILLTYPE is one of DH_DATA_XXX, and the DRILLTABLE
is the name of the Wholeplot database table; e.g. Project_Assay.gdb
in the above case. The DRILLTABLE is only included in the template
for DH_DATA_FROMTO and DH_DATA_POINT, but this function will
return the appropriate table names (e.g. Collar, Survey, ENSurvey)
for the other types.
If the DRILLTYPE is NOT found in the template, a value of
DH_DATA_UNKNOWN is returned for the data type; likely an indication that this
is not a new-style template produced by Wholeplot.
This version also returns a list of the channels in the template checks can be made to
see if the import will exceed the database channel limit.
get_unique_channel_items((str)arg1, (int)arg2, (GXVV)arg3) → None:
Return a VV with unique items in a channel.
Parameters:
  • arg1 (str) – Channel code
  • arg2 (int) – Selected holes (1), All holes (0)
  • arg3 (geosoft.gxapi.GXVV) – VV filled with items (converted to this VV type)
Returns:

Nothing

Return type:

None

New in version 7.0.0.

Note:

Finds and sorts all the unique non-dummy items for the selected channel.
get_unique_channel_items_from_collar((str)arg1, (int)arg2, (GXVV)arg3) → None:
Return a VV with unique items in a channel.
Parameters:
  • arg1 (str) – Channel
  • arg2 (int) – Selected holes (1), All holes (0)
  • arg3 (geosoft.gxapi.GXVV) – VV filled with items (converted to this VV type)
Returns:

Nothing

Return type:

None

New in version 7.3.0.

Note:

Finds and sorts all the unique non-dummy items for the selected channel.
get_units((str_ref)arg1, (float_ref)arg2) → None:
Get the positional units and conversion factor to m.
Parameters:
Returns:

Nothing

Return type:

None

New in version 5.0.0.

grid_intersection((float)arg1, (float)arg2, (float)arg3, (float)arg4, (float)arg5, (str)arg6, (float_ref)arg7, (float_ref)arg8, (float_ref)arg9) → int:
Algorithm to determine the intersection of a straight hole with a surface (DEM) grid.
Parameters:
  • arg1 (float) – Input location on hole X
  • arg2 (float) – Input location on hole Y
  • arg3 (float) – Input location on hole Z
  • arg4 (float) – Dip (positive up) in degrees
  • arg5 (float) – Azimuth in degrees
  • arg6 (str) – DEM grid
  • arg7 (geosoft.gxapi.float_ref) – returned intersection point X
  • arg8 (geosoft.gxapi.float_ref) – returned intersection point Y
  • arg9 (geosoft.gxapi.float_ref) – returned intersection point Z
Returns:

1 if an intersection is found, 0 if not.

Return type:

int

New in version 7.3.0.

Note:

Given a point on the hole and the straight hole dip and azimuth,
ocate (an) intersection point with the input DEM grid.
h_assay_db((int)arg1) → GXDB:
Database for an assay data set.
Parameters:arg1 (int) – Assay dataset number
Returns:x - DB geosoft.gxapi.GXDB.null() if no assay data (no error registered)
Return type:geosoft.gxapi.GXDB

New in version 5.1.3.

Note:

Works for both single and multiple DB Wholeplots.
h_assay_symb((int)arg1, (int)arg2) → int:
Line/Group symbol for a specific assay data set hole.
Parameters:
  • arg1 (int) – Assay dataset number
  • arg2 (int) – hole index number
Returns:

x - DB_SYMB NULLSYMB if no survey data for this hole (no error registered)

Return type:

int

New in version 5.1.3.

Note:

Works for both single and multiple DB Wholeplots.
h_collar_db() → GXDB:
Database for the collar table.
Returns:x - DB geosoft.gxapi.GXDB.null() if no collar table (no error registered)
Return type:geosoft.gxapi.GXDB

New in version 5.1.3.

Note:

Works for both single and multiple DB Wholeplots.
h_collar_symb() → int:
Line/Group symbol for the collar table.
Returns:x - DB_SYMB NULLSYMB if no collar table (no error registered)
Return type:int

New in version 5.1.3.

Note:

Works for both single and multiple DB Wholeplots.
h_dip_az_survey_db() → GXDB:
Database for the Dip-Azimuth survey data
Returns:x - DB geosoft.gxapi.GXDB.null() if no dip-azimuth survey data (no error registered)
Return type:geosoft.gxapi.GXDB

New in version 5.1.3.

Note:

Works for both single and multiple DB Wholeplots.
h_dip_az_survey_symb((int)arg1) → int:
Line/Group symbol for a specific hole Dip-Azimuth survey.
Parameters:arg1 (int) – hole index number
Returns:x - DB_SYMB NULLSYMB if no Dip-Azimuth survey data for this hole (no error registered)
Return type:int

New in version 5.1.3.

Note:

Works for both single and multiple DB Wholeplots.
h_en_survey_db() → GXDB:
Database for the East-North survey data
Returns:x - DB geosoft.gxapi.GXDB.null() if no East-North survey data (no error registered)
Return type:geosoft.gxapi.GXDB

New in version 5.1.3.

Note:

Works for both single and multiple DB Wholeplots.
h_en_survey_symb((int)arg1) → int:
Line/Group symbol for a specific hole East-North survey.
Parameters:arg1 (int) – hole index number
Returns:x - DB_SYMB NULLSYMB if no EN survey data for this hole (no error registered)
Return type:int

New in version 5.1.3.

Note:

Works for both single and multiple DB Wholeplots.
static have_current() → bool:
Returns true if a drill project is loaded
Returns:bool
Return type:bool

New in version 6.1.0.

static have_current2((str_ref)arg1) → bool:
Returns true if a drill project is loaded, and the collar database if it is loaded.
Parameters:arg1 (geosoft.gxapi.str_ref) – Collar table name (returned)
Returns:bool
Return type:bool

New in version 6.1.0.

hole_lst((GXLST)arg1) → None:
Populate an LST with the list of the selected holes
Parameters:arg1 (geosoft.gxapi.GXLST) – LST handle
Returns:Nothing
Return type:None

New in version 5.0.0.

hole_lst2((GXLST)arg1) → None:
Populate an LST with the list of all the holes
Parameters:arg1 (geosoft.gxapi.GXLST) – LST handle
Returns:Nothing
Return type:None

New in version 5.1.2.

static hole_select_from_list_gui((GXLST)arg1, (GXLST)arg2) → int:
Select/Deselect holes using the two-panel selection tool.
Parameters:
Returns:

0 - Ok -1 - User Cancelled

Return type:

int

New in version 7.0.0.

hole_selection_tool_gui() → int:
Select/Deselect holes using plan map tool.
Returns:0 - Ok -1 - User Cancelled
Return type:int

New in version 5.1.8.

holes() → int:
Return number of holes.
Returns:x - Number of holes
Return type:int

New in version 5.0.0.

static import2((str)arg1, (GXDB)arg2, (int)arg3, (int)arg4, (str)arg5, (int)arg6, (str)arg7) → None:
Imports data into a Drill Hole Database (obsolete).
Parameters:
  • arg1 (str) – Drill project name
  • arg2 (geosoft.gxapi.GXDB) – DB Handle
  • arg3 (int) – Line
  • arg4 (int) – Hole channel
  • arg5 (str) – Table
  • arg6 (int) – DH_DATA constants
  • arg7 (str) – Log file name
Returns:

Nothing

Return type:

None

New in version 7.0.0.

import_las((str)arg1, (str)arg2, (float)arg3, (int)arg4, (GXWA)arg5) → None:
Imports LAS Data into a DH database
Parameters:
  • arg1 (str) – Assay database to use
  • arg2 (str) – LAS file name
  • arg3 (float) – Averaging/desampling interval (cm)
  • arg4 (int) – Interpolation method
  • arg5 (geosoft.gxapi.GXWA) – Log file handle
Returns:

Nothing

Return type:

None

New in version 6.0.1.

Note:

The argument for the assay database is the file name
without the project name and underscore, e.g. for
"Project_Assay.gdb" use "Assay"
static is_esri() → int:
Running inside ArcGIS?
Returns:0 - if No 1 - if Yes
Return type:int

New in version 5.1.8.

is_null() → bool

Check if the instance of geosoft.gxapi.GXDH is null (undefined)

Returns:True if this is a null instance of geosoft.gxapi.GXDH, False otherwise.
Return type:bool`
litho_grid_3d((str)arg1, (GXTPAT)arg2, (str)arg3, (float)arg4, (float)arg5, (float)arg6, (int)arg7, (GXREG)arg8, (int)arg9) → None:
Create a lithology voxel grid with lith codes mapped to single values.
Parameters:
  • arg1 (str) – Lithology channel code
  • arg2 (geosoft.gxapi.GXTPAT) – Codes, colours etc.
  • arg3 (str) – Name of VOX Persistent Storage file
  • arg4 (float) – Cell Size (GS_R8DM for automatic calculation)
  • arg5 (float) – Max gap to skip when compositing (GS_R8DM for none)
  • arg6 (float) – Non-contact radius.
  • arg7 (int) – Gridding type (0: Rangrid, 1: TinGrid)
  • arg8 (geosoft.gxapi.GXREG) – Rangrid control REG (see RGRD class for parameters)
  • arg9 (int) – Retain top/bottom grids?
Returns:

Nothing

Return type:

None

New in version 7.0.0.

Note:

Values in the input channel are assigned the index of the corresponding
item found in the input TPAT.
The compositing gap refers to the size of gaps in the data (either
a blank lithology or missing from-to interval) which will be ignored
when compositing lithologies into contiguous from-to intervals.
The non-contact radius is used to dummy out the level grids around holes
where the gridded lithology is not found. If not specified (dummy) then
half the distance to the nearest contacting hole is used.
load_data_parameters_ini((GXDB)arg1, (str)arg2) → None:
Load data parameters from INI files..
Parameters:
  • arg1 (geosoft.gxapi.GXDB) – Source database
  • arg2 (str) – Directory to store INI files
Returns:

Nothing

Return type:

None

New in version 6.0.0.

Note:

Wholeplot data graphing parameters for each channel are stored
in the channel REG. This function lets a user transfer pre-defined
settings to individual INI files (eg. cu.ini).
load_plot_parameters((str)arg1, (int)arg2) → None:
Load parameters from a Job into the Drill object.
Parameters:
Returns:

Nothing

Return type:

None

New in version 6.0.0.

load_select((str)arg1) → None:
Load selections to from a file.
Parameters:arg1 (str) – File Name
Returns:Nothing
Return type:None

New in version 5.0.0.

mask_ply((GXPLY)arg1, (GXIPJ)arg2, (float)arg3, (str)arg4, (int)arg5, (int)arg6) → None:
Set mask channel based on view selection polygon.
Parameters:
Returns:

Nothing

Return type:

None

New in version 5.1.3.

Note:

Data values inside the polygon area, and within the slice thickness
have their mask channel values set to 1.
If the specified mask channel does not exist, it is created.
DH_MASK_NEW --- Mask is created new for each selected hole
DH_MASK_APPEND --- Current selection is added to previous.
modify3d_gui((str)arg1, (int_ref)arg2) → int:
Modify parameters for a 3D plot.
Parameters:
Returns:

0 - Ok -1 - User Cancelled

Return type:

int

New in version 5.1.6.

modify_crooked_section_holes_gui((str)arg1, (int_ref)arg2) → int:
Modify parameters to replot holes and hole data to an existing crooked section map.
Parameters:
Returns:

0 - Ok -1 - User Cancelled

Return type:

int

New in version 7.2.0.

Note:

Will plot to an empty crooked section.
modify_fence_gui((str)arg1, (int_ref)arg2) → int:
Modify parameters for a section plot.
Parameters:
Returns:

0 - Ok 1 - Interactively define a fence. -1 - User Cancelled

Return type:

int

New in version 7.0.0.

Note:

The fence section function.
modify_hole_traces_3dgui((str)arg1, (int_ref)arg2) → int:
Modify parameters for a hole traces plot to an existing 3D view.
Parameters:
Returns:

0 - Ok -1 - User Cancelled

Return type:

int

New in version 6.1.0.

modify_hole_traces_gui((str)arg1, (int_ref)arg2) → int:
Modify parameters for a hole traces plot to a current map.
Parameters:
Returns:

0 - Ok -1 - User Cancelled

Return type:

int

New in version 5.1.2.

modify_hole_traces_gui2((str)arg1, (int)arg2, (int_ref)arg3) → int:
Modify parameters for a hole traces plot to a current plan or section view.
Parameters:
Returns:

0 - Ok -1 - User Cancelled

Return type:

int

New in version 8.3.0.

Note:

Currently supports DH_PLOT_PLAN and DH_PLOT_SECTION
modify_plan_gui((str)arg1, (int_ref)arg2) → int:
Modify parameters for a plan plot.
Parameters:
Returns:

0 - Ok -1 - User Cancelled

Return type:

int

New in version 5.1.2.

modify_plan_holes_gui((str)arg1, (int_ref)arg2) → int:
Modify parameters to replot holes and hole data to an existing plan map.
Parameters:
Returns:

0 - Ok -1 - User Cancelled

Return type:

int

New in version 7.1.0.

Note:

Modifies only hole trace, hole data, topo, voxel slice data.
static modify_rock_codes_gui((str)arg1) → int:
Modify/create a rock codes file.
Parameters:arg1 (str) – File name
Returns:0 - Ok -1 - User Cancelled
Return type:int

New in version 5.1.2.

static modify_rock_codes_gui2((GXDB)arg1, (str)arg2) → int:
Modify/create a rock codes file, channel population option.
Parameters:
Returns:

0 - Ok -1 - User Cancelled

Return type:

int

New in version 6.1.0.

Note:

Same as above, but passes the current database so that
the "Populate from channel" button can be used to
automatically populate the rock code list. The database
should be a Wholeplot database.
modify_section_gui((str)arg1, (int_ref)arg2) → int:
Modify parameters for a section plot.
Parameters:
Returns:

0 - Ok 1 - Interactively define a NS section 2 - Interactively define an EW section 3 - Interactively define an angled section -1 - User Cancelled

Return type:

int

New in version 5.1.2.

Note:

The stacked section function uses the same control file
format, but the plotting of profiles and plan views is
disabled, and if multiple sections are requested, they
are plotted in a stack on the left side of the same map,
not to individual maps.
modify_section_holes_gui((str)arg1, (int_ref)arg2) → int:
Modify parameters to replot holes and hole data to an existing section map.
Parameters:
Returns:

0 - Ok -1 - User Cancelled

Return type:

int

New in version 7.1.0.

Note:

Works for both regular and stacked sections.
Modifies only hole trace, hole data, topo, voxel slice data.
modify_stacked_section_gui((str)arg1, (int_ref)arg2) → int:
Modify parameters for a section plot.
Parameters:
Returns:

0 - Ok 1 - Interactively define a NS section 2 - Interactively define an EW section 3 - Interactively define an angled section -1 - User Cancelled

Return type:

int

New in version 5.1.8.

Note:

The stacked section function uses the same control file
format, but the plotting of profiles and plan views is
disabled, and if multiple sections are requested, they
are plotted in a stack on the left side of the same map,
not to individual maps.
modify_strip_log_gui((str)arg1, (int_ref)arg2) → int:
Modify parameters for a strip log plot.
Parameters:
Returns:

0 - Ok -1 - User Cancelled

Return type:

int

New in version 5.1.3.

static modify_structure_codes_gui((str)arg1) → int:
Modify/create a structure codes file.
Parameters:arg1 (str) – File name
Returns:0 - Ok -1 - User Cancelled
Return type:int

New in version 6.1.0.

static modify_structure_codes_gui2((GXDB)arg1, (str)arg2) → int:
Modify/create a structure codes file, channel population option.
Parameters:
Returns:

0 - Ok -1 - User Cancelled

Return type:

int

New in version 6.1.0.

Note:

Same as above, but passes the current database so that
the "Populate from channel" button can be used to
automatically populate the structure code list. The database
should be a Wholeplot database.
static null() → GXDH

A null (undefined) instance of geosoft.gxapi.GXDH

Returns:A null geosoft.gxapi.GXDH
Return type:geosoft.gxapi.GXDH
num_assays() → int:
Number of assay datasets.
Returns:The number of assay datasets.
Return type:int

New in version 5.1.3.

Note:

Works for both single and multiple DB Wholeplots.
num_selected_holes() → int:
Returns number of selected holes.
Returns:The number of selected holes
Return type:int

New in version 5.0.0.

numeric_chan_lst((GXLST)arg1) → None:
Fills a LST with available numeric channel code values.
Parameters:arg1 (geosoft.gxapi.GXLST) – LST to fill with channel code values.
Returns:Nothing
Return type:None

New in version 7.2.0.

Note:

Channel codes are in the format "[Assay] Au", where the name in
the square brackets is descriptive part of the project database
containing the given channel name. The above code might refer to
the "Au" channel in the "Tutorial_Assay.gdb" database.
numeric_from_to_data_lst((str)arg1, (GXLST)arg2) → None:
Fills a LST with available numeric channel code values from From-To databases..
Parameters:
  • arg1 (str) – Assay dataset (“” for all)
  • arg2 (geosoft.gxapi.GXLST) – LST to fill with channel code values.
Returns:

Nothing

Return type:

None

New in version 7.2.0.

Note:

Channel codes are in the format "[Assay] Au", where the name in
the square brackets is descriptive part of the project database
containing the given channel name. The above code might refer to
the "Au" channel in the "Tutorial_Assay.gdb" database.
static open((str)arg1) → GXDH:
Open DH from collar database and load all associated databases.
Parameters:arg1 (str) – Name of collar database
Returns:DH Object
Return type:geosoft.gxapi.GXDH

New in version 7.1.0.

open_job((str)arg1, (int)arg2) → None:
Open a DH plotting job
Parameters:
Returns:

Nothing

Return type:

None

New in version 5.0.0.

plot_hole_traces((GXMAP)arg1, (str)arg2) → None:
Plot hole traces to a regular (plan) map.
Parameters:
Returns:

Nothing

Return type:

None

New in version 5.1.2.

Note:

Both the hole traces and data can be plotted.
The DHPLANHOLES GX uses the default plan map parameter file
"_plan.inp".
plot_hole_traces_3d((GXMVIEW)arg1, (str)arg2) → None:
Plot hole traces to an existing 3D map view.
Parameters:
  • arg1 (geosoft.gxapi.GXMVIEW) – Existing 3D map view
  • arg2 (str) – Parameter file (INI) name (normally *.in3)
Returns:

Nothing

Return type:

None

New in version 6.1.0.

Note:

Both the hole traces and data can be plotted.
The DH3DHOLES GX uses the default 3D map parameter file
"_3D.in3".
plot_holes_on_section((str)arg1, (int)arg2, (str)arg3) → None:
Plot the currently selected holes on an existing section view.
Parameters:
  • arg1 (str) – Parameter (INI) name
  • arg2 (int) – DH_PLOT constants Section plot type (DH_PLOT_SECTION or DH_PLOT_SECTION_CROOKED
  • arg3 (str) – View name
Returns:

Nothing

Return type:

None

New in version 8.3.0.

Note:

Plot the currently selected holes to a section view.
plot_symbols_3d((GXMVIEW)arg1, (str)arg2) → None:
Plot 3D symbols to an existing 3D map view.
Parameters:
  • arg1 (geosoft.gxapi.GXMVIEW) – Existing 3D map view
  • arg2 (str) – Parameter file (INI) name (normally *.in3)
Returns:

Nothing

Return type:

None

New in version 9.1.0.

punch_grid_holes((GXIMG)arg1, (GXVV)arg2, (GXVV)arg3, (GXVV)arg4, (float)arg5) → None:
Dummy out locations in a grid around non-contact holes.
Parameters:
Returns:

Nothing

Return type:

None

New in version 7.0.0.

Note:

Grid is dummied out to the blanking distance around holes where
the input Z value is dummy. If a contacting hole is closer then
twice the blanking distance, the blanking distance is reduced
accordingly. Distances are measured horizontally (e.g. Z is ignored).
If the blanking distance is zero or dummy, the distance is
automatically set to half the distance to the closest hole intersection.
qa_collar((GXWA)arg1) → None:
Do QA/QC on Hole Collar data.
Parameters:arg1 (geosoft.gxapi.GXWA) – WA Handle
Returns:Nothing
Return type:None

New in version 5.1.3.

qa_collar_lst((GXLST)arg1, (GXWA)arg2) → None:
Do QA/QC on Hole Collar data - LST of holes.
Parameters:
Returns:

Nothing

Return type:

None

New in version 7.0.1.

qa_dip_az_curvature((GXWA)arg1, (float)arg2) → None:
Do QA/QC Curvature checking on Dip Azimuth data.
Parameters:
  • arg1 (geosoft.gxapi.GXWA) – WA Handle
  • arg2 (float) – Dip/Azimuth curvature tolerance (degree per meter)
Returns:

Nothing

Return type:

None

New in version 5.1.3.

Note:

Checks all holes with Dip-Azimuth survey data
qa_dip_az_curvature2((GXWA)arg1, (float)arg2, (str)arg3) → None:
Do QA/QC Curvature checking on Dip Azimuth data for a single hole.
Parameters:
  • arg1 (geosoft.gxapi.GXWA) – WA Handle
  • arg2 (float) – Dip/Azimuth curvature tolerance (degree per meter)
  • arg3 (str) – Hole name
Returns:

Nothing

Return type:

None

New in version 6.4.2.

Note:

Checks single hole with Dip-Azimuth survey data
qa_dip_az_curvature_lst((GXLST)arg1, (float)arg2, (GXWA)arg3) → int:
Do QA/QC Curvature checking on Dip Azimuth data for holes in a LST.
Parameters:
Returns:

The number of holes found and checked.

Return type:

int

New in version 7.0.0.

Note:

Checks all holes with Dip-Azimuth survey data
qa_dip_az_survey((GXDB)arg1, (GXWA)arg2, (int)arg3, (str)arg4) → None:
Do QA/QC on Dip/Az Survey data.
Parameters:
Returns:

Nothing

Return type:

None

New in version 5.1.3.

Note:

Error if no Dip-Azimuth survey database, or if
the requested line does not exist in the database.
qa_dip_az_survey_lst((GXLST)arg1, (GXWA)arg2) → int:
Do QA/QC on Dip/Az Survey data for holes in a LST.
Parameters:
Returns:

The number of holes found and checked.

Return type:

int

New in version 7.0.0.

Note:

Error if no Dip-Azimuth survey database, or if
a requested hole does not exist in the drill project.
qa_east_north_curvature((GXWA)arg1, (float)arg2) → None:
Do QA/QC Curvature checking on Dip Azimuth data.
Parameters:
  • arg1 (geosoft.gxapi.GXWA) – WA Handle
  • arg2 (float) – Dip/Azimuth curvature tolerance (degree per meter)
Returns:

Nothing

Return type:

None

New in version 5.1.3.

Note:

Checks all holes with East-North survey data
qa_east_north_curvature2((GXWA)arg1, (float)arg2, (str)arg3) → None:
Do QA/QC Curvature checking on Dip Azimuth data for a single hole.
Parameters:
  • arg1 (geosoft.gxapi.GXWA) – WA Handle
  • arg2 (float) – Dip/Azimuth curvature tolerance (degree per meter)
  • arg3 (str) – Hole name
Returns:

Nothing

Return type:

None

New in version 6.4.2.

Note:

Checks single holes with East-North survey data
qa_east_north_curvature_lst((GXLST)arg1, (float)arg2, (GXWA)arg3) → int:
Do QA/QC Curvature checking on Dip Azimuth data for holes in a LST.
Parameters:
Returns:

The number of holes found and checked.

Return type:

int

New in version 7.0.0.

Note:

Checks all holes with East-North survey data
qa_east_north_survey((GXDB)arg1, (GXWA)arg2, (int)arg3, (str)arg4) → None:
Do QA/QC on East/North Survey data.
Parameters:
Returns:

Nothing

Return type:

None

New in version 5.1.3.

Note:

Error if no East-North survey database, or if
the requested line does not exist in the database.
qa_east_north_survey_lst((GXLST)arg1, (GXWA)arg2) → int:
Do QA/QC on East/North Survey data for holes in a LST.
Parameters:
Returns:

The number of holes found and checked.

Return type:

int

New in version 7.0.0.

Note:

Error if no East-North survey database, or if
a requested hole does not exist in the drill project.
qa_from_to_data((GXDB)arg1, (GXWA)arg2, (int)arg3, (str)arg4) → None:
Do QA/QC on From/To data.
Parameters:
Returns:

Nothing

Return type:

None

New in version 5.1.3.

qa_point_data((GXDB)arg1, (GXWA)arg2, (int)arg3, (str)arg4) → None:
Do QA/QC on Point data.
Parameters:
Returns:

Nothing

Return type:

None

New in version 5.1.3.

qa_write_unregistered_holes((GXDB)arg1, (GXWA)arg2) → None:
Write out unregistered holes in a database.
Parameters:
Returns:

Nothing

Return type:

None

New in version 6.1.0.

Note:

Looks at each line in a database and sees if it is listed in
the collar tables' hole list.
re_survey_east_north((str)arg1, (GXVV)arg2, (GXVV)arg3, (GXVV)arg4, (GXVV)arg5, (float)arg6, (float)arg7, (float)arg8, (float)arg9, (float_ref)arg10) → None:
Resurvey an East-North-RL survey.
Parameters:
Returns:

Nothing

Return type:

None

New in version 5.1.3.

Note:

Re-interpolates in X, Y and Z to proper depth interval
and returns depths for each point
re_survey_pol_fit((str)arg1, (GXVV)arg2, (GXVV)arg3, (GXVV)arg4, (float)arg5, (float)arg6, (float)arg7, (float)arg8, (float)arg9, (float)arg10, (int)arg11, (int)arg12, (GXVV)arg13, (GXVV)arg14, (GXVV)arg15, (GXVV)arg16) → None:
Use the polynomial fit resurveying method.
Parameters:
Returns:

Nothing

Return type:

None

New in version 5.1.2.

Note:

Uses the polynomial fit method to calculate (X, Y, Z)
locations down the hole from azimuth, dip, depth values.
The collar is assumed to be at zero depth, and depth is the
measure distance down the hole (even if it's horizontal).
A negative dip convention means vertical down is -90 degrees.
The polynomial order must be in the range 1-20, with 5 being adequate
for most smoothly curving holes. The order is reduced to no more than
the number of input points.
re_survey_rad_curve((str)arg1, (GXVV)arg2, (GXVV)arg3, (GXVV)arg4, (float)arg5, (float)arg6, (float)arg7, (float)arg8, (float)arg9, (float)arg10, (int)arg11, (GXVV)arg12, (GXVV)arg13, (GXVV)arg14, (GXVV)arg15) → None:
Use radius of curvature resurveying method.
Parameters:
Returns:

Nothing

Return type:

None

New in version 5.1.2.

Note:

Uses the Radius of curvature method to calculate (X, Y, Z)
locations down the hole from azimuth, dip, depth values.
The collar is assumed to be at zero depth, and depth is the
measure distance down the hole (even if it's horizontal).
A negative dip convention means vertical down is -90 degrees.
re_survey_straight((str)arg1, (float)arg2, (float)arg3, (float)arg4, (float)arg5, (float)arg6, (float)arg7, (float)arg8, (float)arg9, (int)arg10, (GXVV)arg11, (GXVV)arg12, (GXVV)arg13, (GXVV)arg14) → None:
Resurvey a straight hole.
Parameters:
  • arg1 (str) – Hole ID (used for error messages)
  • arg2 (float) – Collar Dip
  • arg3 (float) – Collar Azimuth
  • arg4 (float) – Collar X (easting) (depth = 0)
  • arg5 (float) – Collar Y (northing)(depth = 0)
  • arg6 (float) – Collar Z (elevation) (depth = 0)
  • arg7 (float) – Minimum hole depth to start output values
  • arg8 (float) – Maximum hole depth for output values
  • arg9 (float) – Increment for output values
  • arg10 (int) – DIP_CONVENTION constants
  • arg11 (geosoft.gxapi.GXVV) – X (Easting) - Output
  • arg12 (geosoft.gxapi.GXVV) – Y (Northin) - Output
  • arg13 (geosoft.gxapi.GXVV) – Z (Elevation) - Output
  • arg14 (geosoft.gxapi.GXVV) – Depths - Output
Returns:

Nothing

Return type:

None

New in version 5.1.2.

Note:

Assumes a straight hole to calculate (X, Y, Z)
locations down the hole from azimuth, dip, depth values.
The collar is assumed to be at zero depth, and depth is the
measure distance down the hole (even if it's horizontal).
A negative dip convention means vertical down is -90 degrees.
re_survey_straight_seg((str)arg1, (GXVV)arg2, (GXVV)arg3, (GXVV)arg4, (float)arg5, (float)arg6, (float)arg7, (float)arg8, (float)arg9, (float)arg10, (int)arg11, (GXVV)arg12, (GXVV)arg13, (GXVV)arg14, (GXVV)arg15) → None:
Resurvey a hole with straight segments between locations.
Parameters:
Returns:

Nothing

Return type:

None

New in version 6.2.0.

Note:

Calculate (X, Y, Z) locations down the hole from azimuth, dip,
depth values, assuming each segment is straight, and the hole
bends at each successive azimuth, dip, depth value.
The collar is assumed to be at zero depth, and depth is the
measure distance down the hole (even if it's horizontal).
A negative dip convention means vertical down is -90 degrees.
replot_holes((str)arg1, (int)arg2) → None:
Replot holes on an existing drill map.
Parameters:
Returns:

Nothing

Return type:

None

New in version 7.1.0.

Note:

The parameter file must correspond to the plot Type.
The hDH->hMAP value must be set first, using geosoft.gxapi.GXDH.set_map()().
Overwrites existing hole and hole data groups.
Replots the legend if the legend is enabled.
This should only be used on a slightly modified version of the
INI file used to create the existing map, or things may not
work out (e.g. bad locations etc).
save_data_parameters_ini((GXDB)arg1, (str)arg2) → None:
Save data parameters to INI files..
Parameters:
  • arg1 (geosoft.gxapi.GXDB) – Source database
  • arg2 (str) – Directory to store INI files
Returns:

Nothing

Return type:

None

New in version 6.0.0.

Note:

Wholeplot data graphing parameters for each channel are stored
in the channel REG. This function lets a user transfer pre-defined
settings to individual INI files (eg. cu.ini).
As of v6.3, the DH object is NOT required for this function, and
is, in fact, ignored.
save_job((str)arg1, (int)arg2) → None:
Save a DH plotting job
Parameters:
Returns:

Nothing

Return type:

None

New in version 5.0.0.

save_select((str)arg1) → None:
Saves current selections to a file.
Parameters:arg1 (str) – File Name
Returns:Nothing
Return type:None

New in version 5.0.0.

section_window_size_mm((float_ref)arg1, (float_ref)arg2) → None:
Deterine the size, in mm, of the section window
Parameters:
Returns:

Nothing

Return type:

None

New in version 6.0.0.

Note:

Given the current selection of windows (e.g. legend, plan),
paper size and orientation, return the size in mm of the
window used for plotting the section.
select_all_holes() → None:
Select all the holes in a Drill hole project.
Returns:Nothing
Return type:None

New in version 5.0.0.

select_holes((GXVV)arg1, (int)arg2) → None:
Select holes by hole indices.
Parameters:
  • arg1 (geosoft.gxapi.GXVV) – INT VV with hole indices.
  • arg2 (int) – 0 - deselect, 1 - select
Returns:

Nothing

Return type:

None

New in version 6.3.0.

Note:

Indices less than 0 are skipped. This lets you use this function
after a call to geosoft.gxapi.GXLST.find_items(), which returns -1 for indices not located.
select_name((str)arg1, (int)arg2, (int)arg3) → None:
Select holes using a name mask.
Parameters:
  • arg1 (str) – mask
  • arg2 (int) – 0 - deselect, 1 - select
  • arg3 (int) – 0 - overwrite, 1 - append
Returns:

Nothing

Return type:

None

New in version 5.0.0.

Note:

Overwrite mode - all selections tested and selected or not selected
Append mode    - only holes matching the mask are selected or not selected.
select_ply((GXPLY)arg1) → None:
Select all holes in PLY (Polygon) object.
Parameters:arg1 (geosoft.gxapi.GXPLY) – Polygon object
Returns:Nothing
Return type:None

New in version 5.0.0.

Note:

This function operates the same as the call:

geosoft.gxapi.GXDH.select_ply2()(Drill, 1, 0, 0);
select_ply2((GXPLY)arg1, (int)arg2, (int)arg3, (int)arg4) → None:
Select holes in PLY (Polygon) object with options.
Parameters:
  • arg1 (geosoft.gxapi.GXPLY) – Polygon object
  • arg2 (int) – Select (0) or Deselect (1)
  • arg3 (int) – Region (0: inside, 1: outside)
  • arg4 (int) – Mode (0: Append, 1: New)
Returns:

Nothing

Return type:

None

New in version 6.1.0.

Note:

The various selection options give the following results:

New/Select/inside: Unselect all holes, then
                   select all holes inside the polygon.
New/Select/outside: Unselect all holes, then
                   select all holes outside the polygon.
New/Deselect/inside: Select all holes, then
                   deselect all holes inside the polygon.
New/Deselect/outside: Select all holes, then
                   deselect all holes outside the polygon.

Append/Select/inside: Select all holes inside the polygon.
                      Leave selections outside as is.
Append/Select/outside: Select all holes outside the polygon.
                      Leave selections inside as is.
Append/Deselect/inside: Deselect all holes inside the polygon
                      Leave selections outside as is.
Append/Deselect/outside: Deselect all holes outside the polygon.
                      Leave selections inside as is.
set_crooked_section_ipj((GXIPJ)arg1) → None:
Pass the Crooked projection required for plotting to a crooked section.
Parameters:arg1 (geosoft.gxapi.GXIPJ) – Crooked Section IPJ
Returns:Nothing
Return type:None

New in version 7.2.0.

Note:

This might be extracted from an existing crooked section view, or created from a database line.
set_current_view_name((str)arg1) → None:
Set the current map view name.
Parameters:arg1 (str) – View name
Returns:Nothing
Return type:None

New in version 7.2.0.

Note:

Can be used to specify the name of the view to plot into.
set_info((int)arg1, (str)arg2, (str)arg3) → None:
Set Collar Information.
Parameters:
  • arg1 (int) – hole index
  • arg2 (str) – Name of information
  • arg3 (str) – Information
Returns:

Nothing

Return type:

None

New in version 5.0.0.

Note:

If the DH_ELEV channel is requested it will also
search for the DH_RL channel, which is the new
name for the collar elevation.
set_ipj((GXIPJ)arg1) → None:
Set the project IPJ.
Parameters:arg1 (geosoft.gxapi.GXIPJ) – IPJ Handle
Returns:Nothing
Return type:None

New in version 5.1.8.

Note:

The projection for the project is the projection stored
in the DH_EAST channel in the collar table. This
function sets the projection of the (DH_EAST, DH_NORTH)
channel pairs in each of the project databases to the
input IPJ.
The input IPJ cannot be a geographic coordinate system
or this call will fail with an error message.
set_map((GXMAP)arg1) → None:
Store the current MAP to the DH object.
Parameters:arg1 (geosoft.gxapi.GXMAP) – IPJ Handle
Returns:Nothing
Return type:None

New in version 7.1.0.

Note:

Use this before calling the ReplotHoles functions,
so that, instead of creating a new map, the plotting
functions use the existing one.
set_new_ipj((str)arg1) → None:
Set a new project database projection to collar table projection.
Parameters:arg1 (str) – project database name
Returns:Nothing
Return type:None

New in version 5.1.8.

Note:

Gets the IPJ of the collar table current x channel and copies it
into the named database (as long as it is in the project!)
set_selected_holes_vv((GXVV)arg1, (int)arg2) → None:
Set hole selection using hole indices.
Parameters:
  • arg1 (geosoft.gxapi.GXVV) – Input hole indices (must be type INT)
  • arg2 (int) – 0 - overwrite, 1 - append
Returns:

Nothing

Return type:

None

New in version 8.0.0.

static set_template_blob((GXDB)arg1, (str)arg2, (int)arg3) → None:
Store the import template to the database.
Parameters:
Returns:

Nothing

Return type:

None

New in version 6.0.0.

Note:

The template can later be retrieved in order to refresh the
database with a call to the DHIMPORT.GX.

The import types correspond to the DHIMPORT.IMPTYPE variable:
0: ASCII, 1: Database/XLS, 2: ODBC
significant_intersections_db((GXDB)arg1, (GXDB)arg2, (int)arg3, (str)arg4, (float)arg5, (float)arg6, (float)arg7, (float)arg8, (float)arg9, (float)arg10, (float)arg11) → None:
Make a report of Significant Intersections
Parameters:
  • arg1 (geosoft.gxapi.GXDB) – Input assay DB object
  • arg2 (geosoft.gxapi.GXDB) – output composite DB object
  • arg3 (int) – DH_COMPSTDB_HOLSEL constants
  • arg4 (str) – The primary assay channel.
  • arg5 (float) – Minimum Cut off grade for Primary Assay
  • arg6 (float) – Maximum Cut off grade for Primary Assay
  • arg7 (float) – Minimum Composite Length
  • arg8 (float) – Minimum Composite thickness
  • arg9 (float) – Maximum Internal Dilution
  • arg10 (float) – Minimum diluted grade
  • arg11 (float) – Grade for Missing Assays
Returns:

Nothing

Return type:

None

New in version 7.2.0.

slice_selection_tool_gui((float)arg1, (float)arg2, (float)arg3, (float)arg4, (float)arg5, (float)arg6, (float)arg7, (float)arg8, (float_ref)arg9, (float_ref)arg10, (float_ref)arg11, (float_ref)arg12) → int:
Select a slice with the holes in context. An optional 4 point area of interest (AOI) can be added to be represented in the UI too.
Parameters:
  • arg1 (float) – 1st Corner of AOI - X
  • arg2 (float) – 1st Corner of AOI - Y
  • arg3 (float) – 2nd Corner of AOI - X
  • arg4 (float) – 2nd Corner of AOI - Y
  • arg5 (float) – 3rd Corner of AOI - X
  • arg6 (float) – 3rd Corner of AOI - Y
  • arg7 (float) – 4th Corner of AOI - X
  • arg8 (float) – 4th Corner of AOI - Y
  • arg9 (geosoft.gxapi.float_ref) – Returned slice 1st point - X
  • arg10 (geosoft.gxapi.float_ref) – Returned slice 1st point - Y
  • arg11 (geosoft.gxapi.float_ref) – Returned slice 2nd point - X
  • arg12 (geosoft.gxapi.float_ref) – Returned slice 2nd point - Y
Returns:

0 - Ok -1 - User Cancelled

Return type:

int

New in version 7.2.0.

string_chan_lst((GXLST)arg1) → None:
Fills a LST with available string channel code values.
Parameters:arg1 (geosoft.gxapi.GXLST) – LST to fill with channel code values.
Returns:Nothing
Return type:None

New in version 7.2.0.

Note:

Channel codes are in the format "[Assay] Au", where the name in
the square brackets is descriptive part of the project database
containing the given channel name. The above code might refer to
the "Au" channel in the "Tutorial_Assay.gdb" database.
string_from_to_data_lst((str)arg1, (GXLST)arg2) → None:
Fills a LST with available string-type channel code values from From-To databases.
Parameters:
  • arg1 (str) – Assay dataset (“” for all)
  • arg2 (geosoft.gxapi.GXLST) – LST to fill with channel code values.
Returns:

Nothing

Return type:

None

New in version 7.2.0.

Note:

Channel codes are in the format "[Geology] Lithology", where the name in
the square brackets is descriptive part of the project database
containing the given channel name. The above code might refer to
the "Lithology" channel in the "Tutorial_Geology.gdb" database.
surface_intersections((GXDB)arg1, (str)arg2, (int)arg3) → None:
Determine intersections of drillholes with a surface.
Parameters:
  • arg1 (geosoft.gxapi.GXDB) – Output DB Handle
  • arg2 (str) – Input surface file
  • arg3 (int) – Selected holes (1), All holes (0)
Returns:

Nothing

Return type:

None

New in version 8.3.0.

test_import_las((str)arg1, (str)arg2, (float)arg3, (GXWA)arg4, (int_ref)arg5) → None:
Tests import of LAS Data for problems.
Parameters:
  • arg1 (str) – Assay table name
  • arg2 (str) – LAS file name
  • arg3 (float) – averaging/desampling interval
  • arg4 (geosoft.gxapi.GXWA) – Log file handle
  • arg5 (geosoft.gxapi.int_ref) – 1 returned if problems found
Returns:

Nothing

Return type:

None

New in version 6.0.1.

Note:

See geosoft.gxapi.GXDH.import_las().
Determines if the import of the LAS data will result in data
being overwritten, interpolated or resampled. Warnings are written to a log
file, as in sImportLAS_DH. Warnings are not registered in cases
where data is merely extended at the start or the end with dummies
to match a different interval down the hole.
un_select_all_holes() → None:
Unselect all the holes in a Drill hole project.
Returns:Nothing
Return type:None

New in version 5.0.0.

un_selected_hole_lst((GXLST)arg1) → None:
Populate an LST with the list of the unselected holes
Parameters:arg1 (geosoft.gxapi.GXLST) – LST handle
Returns:Nothing
Return type:None

New in version 6.3.0.

update_collar_table() → None:
Update all collar table information.
Returns:Nothing
Return type:None

New in version 5.0.0.

update_hole_extent((int)arg1) → None:
Update extents for one hole.
Parameters:arg1 (int) – hole index
Returns:Nothing
Return type:None

New in version 5.0.0.

update_survey_from_collar((int)arg1) → int:
Update the Survey table from the collar info.
Parameters:arg1 (int) – hole index
Returns:0 - No change; there is no survey table, the table was empty, or values were same as collar 1 - Survey table updated; values changed and there is just one row. 2 - Survey table unchanged; there was more than one row in the table, and values were different
Return type:int

New in version 7.1.0.

Note:

Call when the collar values are edited to update the survey table
values. If the survey contains more than one row, then no changes
are applied, and no warning or error is registered.
wholeplot((str)arg1, (int)arg2) → None:
Run a Wholeplot plot job.
Parameters:
Returns:

Nothing

Return type:

None

New in version 5.1.2.

Note:

The parameter file must correspond to the plot Type. The INI file
contains settings for all of the non-database data related
parameters (e.g. Map template, scale, boundaries,
section definitions, hole trace parameters etc...)

DH_DEFAULT_FILENAMES constants

Default filenames
gxapi.DH_DEFAULT_ROCKCODE_FILE = 'agso.csv'
gxapi.DH_DEFAULT_STRUCTURECODE_FILE = 'structcodes.csv'

STR_DH_HOLES constant

gxapi.STR_DH_HOLES = 1048576
This declares the size of the string used in various
DH GXs to store all the currently selected holes, as input to the two-panel
selection tool. This should be big enough for 65,000 16-character hole names!

DH_COMP_CHOICE constants

Composition
gxapi.DH_COMP_DONE = 0
User is done
gxapi.DH_COMP_CANCEL = -1
User canceled
gxapi.DH_COMP_SELECT = 1
User chose to select an interval interactively
gxapi.DH_COMP_REFRESH = 2
User chose to refresh

DH_COMPSTDB_HOLSEL constants

Composite Hole Selection
gxapi.DH_COMPSTDB_HOLSEL_ALL = 0
gxapi.DH_COMPSTDB_HOLSEL_SELECTED = 1

DH_COMPSTDB_INTSEL constants

Composite Interval
gxapi.DH_COMPSTDB_INTSEL_FIXED = 0
gxapi.DH_COMPSTDB_INTSEL_LITHOLOGY = 1
gxapi.DH_COMPSTDB_INTSEL_BESTFITLITH = 2
gxapi.DH_COMPSTDB_INTSEL_INTFILE = 3

DH_DATA constants

What to import
gxapi.DH_DATA_DIPAZIMUTH = 0
gxapi.DH_DATA_EASTNORTH = 1
gxapi.DH_DATA_FROMTO = 2
gxapi.DH_DATA_POINT = 3
gxapi.DH_DATA_COLLAR = 4
gxapi.DH_DATA_UNKNOWN = 100
The type is not known

DH_DEFINE_PLAN constant

gxapi.DH_DEFINE_PLAN = 1
Plans

DH_DEFINE_SECT constants

Types of Sections
gxapi.DH_DEFINE_SECT_NS = 1
gxapi.DH_DEFINE_SECT_EW = 2
gxapi.DH_DEFINE_SECT_ANGLED = 3

DH_EXP constants

Type of Export
gxapi.DH_EXP_CSV = 0
gxapi.DH_EXP_ASCII = 1
gxapi.DH_EXP_ACCESS = 2
gxapi.DH_EXP_SHP = 3
Collars as points
gxapi.DH_EXP_SURPAC = 4
To Surpace Geological database (special format ACCESS)
gxapi.DH_EXP_SHP_TRACES = 5
Hole traces as polylines

DH_HOLES constants

Holes to select
gxapi.DH_HOLES_ALL = 0
gxapi.DH_HOLES_SELECTED = 1

DH_MASK constants

Masks
gxapi.DH_MASK_APPEND = 0
gxapi.DH_MASK_NEW = 1

DH_PLOT constants

Type of Plot
gxapi.DH_PLOT_PLAN = 0
gxapi.DH_PLOT_SECTION = 1
gxapi.DH_PLOT_STRIPLOG = 2
gxapi.DH_PLOT_HOLE_TRACES = 3
gxapi.DH_PLOT_3D = 4
gxapi.DH_PLOT_SECTION_STACK = 5
gxapi.DH_PLOT_SECTION_FENCE = 6
gxapi.DH_PLOT_SECTION_CROOKED = 7

DH_SECT_PAGE constants

Sections
gxapi.DH_SECT_PAGE_SECTION = 1

DH_SURFACE constants

Surface selection for creation of geological
top or bottom surfaces.
gxapi.DH_SURFACE_FIRST_LAYER_FROM = 0
gxapi.DH_SURFACE_FIRST_LAYER_TO = 1
gxapi.DH_SURFACE_SECOND_LAYER_FROM = 2
gxapi.DH_SURFACE_SECOND_LAYER_TO = 3
gxapi.DH_SURFACE_LAST_LAYER_FROM = 4
gxapi.DH_SURFACE_LAST_LAYER_TO = 5

DIP_CONVENTION constants

Dip convention
gxapi.DIP_CONVENTION_NEGATIVE = -1
gxapi.DIP_CONVENTION_POSITIVE = 1