GXARCDB class

class GXARCDB(handle=0)

GXARCDB class.

The GXARCDB class is used in ArcGIS to access table contents from data sources and layers.

create_dat(x_field, y_field, d_field)

Create a handle to a ARCGIS table GXDAT 2D object

Parameters:
  • x_field (str) – Name of X field in table
  • y_field (str) – Name of Y field in table
  • d_field (str) – Name of Data field in table
Returns:

GXDAT, terminates if creation fails

Return type:

GXDAT

New in version 8.0.

License: Geosoft Extended End-User License

create_dat_3d(x_field, y_field, z_field, d_field)

Create a handle to a ARCGIS table GXDAT 3D object

Parameters:
  • x_field (str) – Name of X field in table
  • y_field (str) – Name of Y field in table
  • z_field (str) – Name of Z field in table
  • d_field (str) – Name of Data field in table
Returns:

GXDAT, terminates if creation fails

Return type:

GXDAT

New in version 8.0.

License: Geosoft Extended End-User License

classmethod current()

This method return a handle to the current table

Returns:GXARCDB Handle, ARCDB_NULL if no table selected
Return type:GXARCDB

New in version 8.0.

License: Geosoft Open License

exist_field(field)

This method checks to see if the specified field exists in the table.

Parameters:field (str) – Name of Field
Returns:0 - Field does not exist 1 - Field Exists
Return type:int

New in version 8.0.

License: Geosoft Open License

export_to_db(db, temp, line)

Export data from an GXARCDB table into a group in a Geosoft GDB using a template.

Parameters:
  • db (GXDB) – Database
  • temp (str) – Import template name
  • line (str) – Oasis montaj line name to create (overrides template value)

New in version 8.0.

License: Geosoft Open License

Note: 1. The import template can be in the local directory or the GEOSOFT
directory.
  1. If the line already exists, the data will overwrite the existing data.
field_lst(lst)

Place the list of field names in a GXLST.

New in version 8.0.

License: Geosoft Open License

Note: If Z or M values are supported by the table geometry the strings “<Z Values>” and “<M Values>” will be added accordingly.

classmethod from_i_unknown(unknown)

This method attempts to make a table handle from an IUnknown pointer

Returns GXARCDB Handle, ARCDB_NULL if not successful

Parameters:unknown (int) – IUnknown pointer
Return type:GXARCDB

New in version 8.0.

License: Geosoft Open License

get_i_unknown()

This method gets the IUnknown pointer

Returns:IUnknown pointer
Return type:int

New in version 8.0.

License: Geosoft Open License

get_ipj(ipj)

Get georeference information from a table.

Parameters:ipj (GXIPJ) – GXIPJ to fill in

New in version 8.0.

License: Geosoft Open License

Note: If the table does not have an GXIPJ, the GXIPJ that is returned will have an unknown projection.

import_chem_database_wizard(temp, type)

Template creation for importing geochem data.

Parameters:
Returns:

0-OK 1-Cancel

Return type:

int

New in version 8.0.

License: Geosoft Extended End-User License

is_null()

Check if this is a null (undefined) instance

Returns:True if this is a null (undefined) instance, False otherwise.
Return type:bool
classmethod null()

A null (undefined) instance of GXARCDB

Returns:A null GXARCDB
Return type:GXARCDB
classmethod sel_tbl_ex_gui(table_type)

Select table GXGUI with table type.

Parameters:table_type (int_ref) – ARC_SELTBL_TYPE constants
Returns:Handle to the table (Terminate on Error)
Return type:GXARCDB

New in version 8.0.

License: Geosoft Open License

classmethod sel_tbl_gui()

Select table GXGUI.

Returns:Handle to the table
Return type:GXARCDB

New in version 8.0.

License: Geosoft Open License

Note: Terminates with Cancel on cancel, returns ARCDB_NULL if there are no valid tables in current document.

ARC_SELTBL_TYPE constants

Describes what kind of table was selected

ARC_SELTBL_STANDALONE

Standalone Table

gxapi.ARC_SELTBL_STANDALONE = 0
ARC_SELTBL_FEATURELAYER

Feature Layer

gxapi.ARC_SELTBL_FEATURELAYER = 1
ARC_SELTBL_CANCELED

User Canceled

gxapi.ARC_SELTBL_CANCELED = -1