GXGUI class

class geosoft.gx.GXGUI
These are graphical functions that typically create a
dialog-style window for a specific function. Examples include
file import wizards, and the Histogram and Scatter tools.
static file_filter_index((GXContext)ctx, (str)arg1) → int:
Return the FILE_FILTER_XXX value for a file filter string.
Parameters:
Returns:

FILE_FILTER constants, -1 if not found

Return type:

int

New in version 7.0.0.

Note:

For example, if "Database (*.gdb)" is input,
then the FILE_FILTER_GDB value is returned.
static gcs_datum_warning_shp((GXContext)ctx, (str)arg1, (GXIPJ)arg2) → int:
Launch the GCS Datum Warning dialogue for SHP files.
Parameters:
Returns:

0 - Ok 1 - Cancel

Return type:

int

New in version 7.1.0.

Note:

Runs the GCS Warning dialogue with one data source
static gcs_datum_warning_shp_ex((GXContext)ctx, (GXLST)arg1, (GXLST)arg2, (GXLST)arg3, (GXMVIEW)arg4) → int:
Launch the GCS Datum Warning dialogue for SHP files.
Parameters:
Returns:

0 - Ok 1 - Cancel

Return type:

int

New in version 7.1.0.

Note:

Runs the GCS Warning dialogue with multiple data sources
static gcs_datum_warning_shpdb_ex((GXContext)ctx, (GXLST)arg1, (GXLST)arg2, (GXLST)arg3, (GXDB)arg4) → int:
Launch the GCS Datum Warning dialogue for SHP files (Database).
Parameters:
Returns:

0 - Ok 1 - Cancel

Return type:

int

New in version 7.1.0.

Note:

Runs the GCS Warning dialogue with multiple data sources (Database)
static get_dat_defaults((GXContext)ctx, (int)arg1, (int)arg2, (str_ref)arg3, (str_ref)arg4) → None:
Return the user default extension and qualifier for grids/images.
Parameters:
Returns:

Nothing

Return type:

None

New in version 7.0.0.

Note:

The default grid/image filters are normally stored in
"MONTAJ.DEFAULT_XGD_IN" and "MONTAJ.DEFAULT_XGD_OUT"

If no filter is defined, or the filter is not found
then "grd" and "GRD" are returned as the default extension
and qualifier.
static get_file_filter((GXContext)ctx, (int)arg1, (str_ref)arg2, (str_ref)arg3, (str_ref)arg4, (int_ref)arg5) → None:
Return the defined filter, mask, extension and directory for an input filter.
Parameters:
Returns:

Nothing

Return type:

None

New in version 7.0.0.

Note:

Returns the four parts of the file filter;
e.g. for FILE_FILTER_GDB it returns:

Filter:    "Database (*.gdb)"
Mask:      "*.gdb"
Extension: "gdb"
Directory: "GS_DIRECTORY_NONE"

This function is useful for constuction open/save dialog
file filters, especially in GX.Net functions.
static get_gs_directory((GXContext)ctx, (int)arg1, (str_ref)arg2) → None:
Return the directory path for value of GS_DIRECTORY.
Parameters:
Returns:

Nothing

Return type:

None

New in version 7.0.0.

Note:

Works along with the geosoft.gx.GXGUI.get_file_filter() function. Note that
most values of FILE_FILTER_XXX will return GS_DIRECTORY_NONE,
and give the current workspace directory.

This function is useful for constuction open/save dialog
file filters, especially in GX.Net functions.

AOI_RETURN_STATE constants

AOI Query Return State
gx.AOI_RETURN_CANCEL = -1
User Canceled
gx.AOI_RETURN_NODEFINE = 0
User chose to continue with no AOI defined or available
gx.AOI_RETURN_DEFINE = 1
User chose to continue and defined valid AOI parameters

COORDSYS_MODE constants

Coordinate system wizard IPJ types allowed on return.
The wizard present three types of projections for selection
by the user, Geographic (GCS), Projected (PCS), and Unknown.
(Unknown requires only that the units be defined.)
The Editable flag must be Yes for this option to take affect,
and is overridden internally if the user's license does not
allow modification of projections (e.g. the OM Viewer).
gx.COORDSYS_MODE_ALL = 0
Allow Geographic (GCS), Projected (PCS), and Unknown
gx.COORDSYS_MODE_GCS = 1
Allow only Geographic (GCS)
gx.COORDSYS_MODE_PCS = 2
Allow only Projected (PCS)
gx.COORDSYS_MODE_GCS_PCS = 3
Allow only Geographic (GCS) and Projected (PCS)
gx.COORDSYS_MODE_PCS_UNKNOWN = 4
Allow only Projected (PCS), or Unknown

DAT_TYPE constants

Type of files (grids, images) to support
gx.DAT_TYPE_GRID = 0
Display only grid formats
gx.DAT_TYPE_IMAGE = 1
Display only image formats
gx.DAT_TYPE_GRID_AND_IMAGE = 2
Displays both grids and image formats

FILE_FILTER constants

File Filters
gx.FILE_FILTER_ALL = 1
All Files              \ `*`\ .\ `*`\                   ANYWHERE
gx.FILE_FILTER_GDB = 2
Geosoft Database       \ `*`\ .gdb                LOCAL
gx.FILE_FILTER_GX = 3
Geosoft Executable     \ `*`\ .gx                 GEOSOFT
gx.FILE_FILTER_GS = 4
Geosoft Script         \ `*`\ .gs                 BOTH
gx.FILE_FILTER_INI = 5
Parameter Files        \ `*`\ .ini                GEOSOFT
gx.FILE_FILTER_OMN = 6
Oasis Menu Files       \ `*`\ .omn                GEOSOFT
gx.FILE_FILTER_VU = 7
Oasis View Files       \ `*`\ .vu                 LOCAL
gx.FILE_FILTER_MAP = 8
Oasis Map Files        \ `*`\ .map                LOCAL
gx.FILE_FILTER_PRJ = 9
Projection File        \ `*`\ .prj                LOCAL
gx.FILE_FILTER_CON = 10
Configuration File     \ `*`\ .con                LOCAL
gx.FILE_FILTER_MNU = 11
Sushi MNU Files        \ `*`\ .mnu                GEOSOFT
gx.FILE_FILTER_PDF = 12
PDF Files              \ `*`\ .pdf                GEOSOFT
gx.FILE_FILTER_PLT = 13
Geosoft PLT files      \ `*`\ .plt                LOCAL
gx.FILE_FILTER_GWS = 14
Geosoft workspace      \ `*`\ .gws                LOCAL
gx.FILE_FILTER_AGG = 15
Aggregate              \ `*`\ .agg                LOCAL
gx.FILE_FILTER_TBL = 16
Color Table            \ `*`\ .tbl                GEOSOFT
gx.FILE_FILTER_ZON = 17
Zone                   \ `*`\ .zon                LOCAL
gx.FILE_FILTER_ITR = 18
Image transform        \ `*`\ .itr                LOCAL
gx.FILE_FILTER_DXF = 19
AutoCAD DXF files      \ `*`\ .dxf                LOCAL
gx.FILE_FILTER_TIF = 20
TIFF files             \ `*`\ .tif                LOCAL
gx.FILE_FILTER_EMF = 21
Enhanced Metafies      \ `*`\ .emf                LOCAL
gx.FILE_FILTER_BMP = 22
Bitmap files           \ `*`\ .bmp                LOCAL
gx.FILE_FILTER_LUT = 23
ER Mapper LUT          \ `*`\ .lut                GEOSOFT
gx.FILE_FILTER_PNG = 24
PNG Files              \ `*`\ .png                LOCAL
gx.FILE_FILTER_JPG = 25
JPG Files              \ `*`\ .jpg                LOCAL
gx.FILE_FILTER_PCX = 26
PCX Files              \ `*`\ .pcx                LOCAL
gx.FILE_FILTER_GIF = 27
GIF Files              \ `*`\ .gif                LOCAL
gx.FILE_FILTER_GRD = 28
GRD Files              \ `*`\ .grd                LOCAL
gx.FILE_FILTER_ERS = 29
ERS Files              \ `*`\ .ers                LOCAL
gx.FILE_FILTER_EPS = 30
EPS Files              \ `*`\ .eps                LOCAL
gx.FILE_FILTER_SHP = 31
ArcView Shape Files    \ `*`\ .shp                LOCAL
gx.FILE_FILTER_CGM = 32
CGM Files              \ `*`\ .cgm                LOCAL
gx.FILE_FILTER_TAB = 33
MapInfo Tab Files      \ `*`\ .tab                LOCAL
gx.FILE_FILTER_COMPS = 34
Software Components    Components           LOCAL
gx.FILE_FILTER_CSV = 35
MapInfo Tab Files      \ `*`\ .tab                LOCAL
gx.FILE_FILTER_GPF = 36
Geosoft Project        \ `*`\ .gpf                LOCAL
gx.FILE_FILTER_PLY = 37
Geosoft Polygons       \ `*`\ .ply                LOCAL
gx.FILE_FILTER_STM = 38
Scatter templates      \ `*`\ .stm                LOCAL
gx.FILE_FILTER_TTM = 39
Triplot templates      \ `*`\ .ttm                LOCAL
gx.FILE_FILTER_XYZ = 40
Geosoft XYZ Files      \ `*`\ .xyz                LOCAL
gx.FILE_FILTER_BAR = 41
Geosoft Bar File       \ `*`\ .geobar             LOCAL
gx.FILE_FILTER_GEOSOFT_LICENSE = 42
Geosoft License Files   \ `*`\ .geosoft_license   LOCAL
gx.FILE_FILTER_XML = 43
XML Files              \ `*`\ .xml                LOCAL
gx.FILE_FILTER_GXNET = 44
GX.NET Files           \ `*`\ .dll                GEOSOFT
gx.FILE_FILTER_ECW = 45
ECW Files              \ `*`\ .ecw                LOCAL
gx.FILE_FILTER_J2K = 46
J2K JPEG 2000 Files    \ `*`\ .j2k                LOCAL
gx.FILE_FILTER_JP2 = 47
JP2 JPEG 2000 Files    \ `*`\ .jp2                LOCAL
gx.FILE_FILTER_SEL = 48
acQuire parameters     \ `*`\ .sel                LOCAL
gx.FILE_FILTER_SVG = 49
SVG File               \ `*`\ .svg                LOCAL
gx.FILE_FILTER_SVZ = 50
SVG Compressed File    \ `*`\ .svz                LOCAL
gx.FILE_FILTER_WRP = 51
Warp File              \ `*`\ .wrp                LOCAL
gx.FILE_FILTER_MAPPLOT = 52
MAPPLOT File           \ `*`\ .con                LOCAL
gx.FILE_FILTER_DTM = 53
Surpac DTM Files       \ `*`\ .dtm                LOCAL
gx.FILE_FILTER_VOXEL = 54
Geosoft Voxel          \ `*`\ .geosoft_voxel      LOCAL
gx.FILE_FILTER_MAPTEMPLATE = 55
Map Template File      \ `*`\ .geosoft_maptemplate      LOCAL
gx.FILE_FILTER_ACTION = 56
Action Scripts         \ `*`\ .action             LOCAL
gx.FILE_FILTER_DM = 57
Datamine files         \ `*`\ .dm                 LOCAL
gx.FILE_FILTER_KML = 58
Google Earth KML       \ `*`\ .kml                LOCAL
gx.FILE_FILTER_KMZ = 59
Google Earth Compressed KML  \ `*`\ .kmz          LOCAL
gx.FILE_FILTER_TARGET_PLAN = 60
Target parameter ini file for plans      \ `*`\ .inp    LOCAL
gx.FILE_FILTER_TARGET_SECTION = 61
Target parameter ini file for sections   \ `*`\ .ins    LOCAL
gx.FILE_FILTER_TARGET_STRIPLOG = 62
Target parameter ini file for strip logs \ `*`\ .inl    LOCAL
gx.FILE_FILTER_TARGET_3D = 63
Target parameter ini file for 3D plots   \ `*`\ .in3    LOCAL
gx.FILE_FILTER_ARGIS_LYR = 64
ArcGIS Layer Files                    \ `*`\ .lyr    LOCAL
gx.FILE_FILTER_ARGIS_MXD = 65
ArcGIS Map Document Files     \ `*`\ .mxd    LOCAL
gx.FILE_FILTER_GOCAD_TS = 66
GOCAD TSurf Files                     \ `*`\ .ts     LOCAL
gx.FILE_FILTER_LST = 67
Geosoft list of items: names, values  \ `*`\ .lst     LOCAL
gx.FILE_FILTER_ECS = 68
GM-SYS Extern Coord Sys \ `*`\ .ecs               LOCAL
gx.FILE_FILTER_TARGET_FENCE = 69
Target parameter ini file for fence sections   \ `*`\ .ins    LOCAL
gx.FILE_FILTER_GMS3D = 70
GMSYS 3D Model \ `*`\ .geosoft_gms3d LOCAL
gx.FILE_FILTER_BT2 = 71
GEMCOM BT2 \ `*`\ .bt2 LOCAL
gx.FILE_FILTER_BPR = 72
GEMCOM BPR \ `*`\ .bpr LOCAL
gx.FILE_FILTER_BPR2 = 73
GEMCOM BPR2 \ `*`\ .bpr2 LOCAL
gx.FILE_FILTER_XLS = 74
Excel 97-2003 Workbook               \ `*`\ .xls                                     LOCAL
gx.FILE_FILTER_XLSX = 75
Excel 2007 Workbook                  \ `*`\ .xlsx                            LOCAL
gx.FILE_FILTER_MDB = 76
Access 97-2003                               \ `*`\ .mdb                             LOCAL
gx.FILE_FILTER_ACCDB = 77
Access 2007                                  \ `*`\ .accdb                           LOCAL
gx.FILE_FILTER_INTERSECTION_TBL = 78
Levelling intersection               \ `*`\ .tbl                                     LOCAL
gx.FILE_FILTER_UBC_CON = 79
UBC DCIP2D Conductivity model files \ `*`\ .con              LOCAL
gx.FILE_FILTER_UBC_CHG = 80
UBC DCIP2D Chargeability model files \ `*`\ .chg     LOCAL
gx.FILE_FILTER_UBC_MSH = 81
UBC DCIP2D Mesh files                \ `*`\ .msh                                     LOCAL
gx.FILE_FILTER_UBC_MSH_DAT = 82
UBC DCIP2D Mesh files                \ `*`\ .dat                                     LOCAL
gx.FILE_FILTER_UBC_TOPO_DAT = 83
UBC DCIP2D Topo files                \ `*`\ .dat                                     LOCAL
gx.FILE_FILTER_UBC_TOPO_XYZ = 84
UBC DCIP2D Topo files                \ `*`\ .xyz                                     LOCAL
gx.FILE_FILTER_XYZ_TEMPLATE_I0 = 85
XYZ Import Templates               \ `*`\ .i0                                LOCAL
gx.FILE_FILTER_PICO_TEMPLATE_I1 = 86
Picodas Import Templates      \ `*`\ .i1                             LOCAL
gx.FILE_FILTER_BB_TEMPLATE_I2 = 87
Block Binary Import Templates \ `*`\ .i2                             LOCAL
gx.FILE_FILTER_ASCII_TEMPLATE_I3 = 88
ASCII Import Templates                  \ `*`\ .i3                           LOCAL
gx.FILE_FILTER_ODBC_TEMPLATE_I4 = 89
ODBC Import Templates                   \ `*`\ .i4                           LOCAL
gx.FILE_FILTER_EXP = 90
Math expression files                   \ `*`\ .exp                          LOCAL
gx.FILE_FILTER_SEGY = 91
SEGY files                                                   \ `*`\ .sgy                     LOCAL
gx.FILE_FILTER_DAARC500 = 92
DAARC500 files                                               xYYMMDD                    LOCAL
gx.FILE_FILTER_TXT = 93
Text files                                                   \ `*`\ .txt                     LOCAL
gx.FILE_FILTER_VOXEL_INVERSION = 94
Voxi                                                                 \ `*`\ .geosoft_voxi    LOCAL
gx.FILE_FILTER_GMS = 95
GM-SYS                                                                       \ `*`\ .gms     LOCAL
gx.FILE_FILTER_FLT3D = 96
Geosoft 3D filter Files                      \ `*`\ .flt3d                   LOCAL
gx.FILE_FILTER_RESOURCE_PACK = 97
Geosoft Resource Update Packages \ `*`\ .geosoft_resource_pack LOCAL
gx.FILE_FILTER_GEOSTRING = 98
Geostring Files \ `*`\ .geosoft_string LOCAL
gx.FILE_FILTER_GEOSURFACE = 99
Geosurface Files \ `*`\ .geosoft_surface LOCAL
gx.FILE_FILTER_GEOSOFT3DV = 100
Geosoft 3DV \ `*`\ .geosoft_3dv LOCAL
gx.FILE_FILTER_VECTORVOXEL = 101
Geosoft Vector Voxel \ `*`\ .geosoft_vectorvoxel LOCAL
gx.FILE_FILTER_FLT = 102
Geosoft Filters \ `*`\ .flt LOCAL
gx.FILE_FILTER_XYZ_TEMPLATE_O0 = 103
XYZ Export Templates \ `*`\ .o0 LOCAL
gx.FILE_FILTER_GMS2D = 104
GMSYS 2D Model \ `*`\ .geosoft_gms2d LOCAL
gx.FILE_FILTER_IP_DATABASE_TEMPLATE = 105
IP Database Template \ `*`\ .geosoft_ipdatabasetemplate LOCAL
gx.FILE_FILTER_GEOSOFT_RESOURCE_MODULE = 106
Geosoft Resource Module \ `*`\ .geosoft_resources  LOCAL
gx.FILE_FILTER_VT = 107
Shell VT Files     \ `*`\ .vt        LOCAL
gx.FILE_FILTER_INT = 108
Shell INT Files     \ `*`\ .int      LOCAL
gx.FILE_FILTER_SGT = 109
Shell SGT Files     \ `*`\ .sgt      LOCAL
gx.FILE_FILTER_IMGVIEW = 110
Image Viewer Files  \ `*`\ .imgview  LOCAL
gx.FILE_FILTER_ZIP = 111
Zip Files  \ `*`\ .zip  LOCAL
gx.FILE_FILTER_GPS_TABLE = 112
GPS Table \ `*`\ .tbl GEOSOFT
gx.FILE_FILTER_VULCAN_TRIANGULATION = 113
Maptek Vulcan trianguilation file   \ `*`\ .tbl     LOCAL
gx.FILE_FILTER_VULCAN_BLOCK_MODEL = 114
Maptek Vulcan block model file       \ `*`\ .bmf                        LOCAL
gx.FILE_FILTER_PRJVIEW = 115
Layout Files  \ `*`\ .prjview  LOCAL
gx.FILE_FILTER_LEAPFROG_MODEL = 116
Leapfrog model files  \ `*`\ .lfm  LOCAL
gx.FILE_FILTER_IOGAS = 117
Reflex ioGAS files  \ `*`\ .gas  LOCAL
gx.FILE_FILTER_ASEG_ESF = 118
ASEG ESF File  \ `*`\ .esf  LOCAL
gx.FILE_FILTER_LACOSTE_DAT = 119
Micro-g LaCoste MGS-6 gravity files  \ `*`\ .DAT  LOCAL

FILE_FORM constants

File Form Defines
gx.FILE_FORM_OPEN = 0
Open a file
gx.FILE_FORM_SAVE = 1
Save a file

GS_DIRECTORY constants

Geosoft predefined directory
gx.GS_DIRECTORY_NONE = 0
gx.GS_DIRECTORY_GEOSOFT = 1
gx.GS_DIRECTORY_BIN = 2
gx.GS_DIRECTORY_GER = 3
gx.GS_DIRECTORY_OMN = 4
gx.GS_DIRECTORY_TBL = 5
gx.GS_DIRECTORY_FONTS = 6
gx.GS_DIRECTORY_GX = 7
gx.GS_DIRECTORY_GS = 8
gx.GS_DIRECTORY_APPS = 9
gx.GS_DIRECTORY_ETC = 10
gx.GS_DIRECTORY_HLP = 11
gx.GS_DIRECTORY_GXDEV = 12
gx.GS_DIRECTORY_COMPONENT = 13
gx.GS_DIRECTORY_CSV = 14
gx.GS_DIRECTORY_LIC = 15
gx.GS_DIRECTORY_INI = 16
gx.GS_DIRECTORY_TEMP = 17
gx.GS_DIRECTORY_UETC = 18
gx.GS_DIRECTORY_UMAPTEMPLATE = 19
gx.GS_DIRECTORY_COMPONENT_SCRIPTS = 50
gx.GS_DIRECTORY_COMPONENT_HTML = 51
gx.GS_DIRECTORY_IMG = 52
gx.GS_DIRECTORY_BAR = 53
gx.GS_DIRECTORY_GXNET = 54
gx.GS_DIRECTORY_MAPTEMPLATE = 55

IMPCH_TYPE constants

Import Chem defines
gx.IMPCH_TYPE_DATA = 0
gx.IMPCH_TYPE_ASSAY = 1