GXEDOC class

class GXEDOC(handle=0)[source]

GXEDOC class.

The GXEDOC class provides access to a generic documents views as loaded within Oasis montaj.

__init__(handle=0)[source]

Initialize self. See help(type(self)) for accurate signature.

classmethod create_new_gms_3d(name, nx, ny, type)[source]

Creates a new GXGMSYS 3D Model into the workspace, flags as new.

Parameters
Returns

Handle to the newly created edited model.

Return type

GXEDOC

New in version 5.0.

License: Geosoft Extended End-User License

Limitations: May not be available while executing a command line program.

Note: See load. This is used for brand new documents, it also sets an internal flag such that if on closing the user chooses not to save changes, the document is deleted thus keeping the project folders clean.

classmethod current(type)[source]

This method returns the Current Edited Document.

Parameters

type (int) – EDOC_TYPE constants

Returns

GXEDOC Object

Return type

GXEDOC

New in version 5.0.

License: Geosoft Open License

Limitations: May not be available while executing a command line program.

classmethod current_if_exists(type)[source]

This method returns the Current Edited Document.

Parameters

type (int) – EDOC_TYPE constants

Returns

GXEDOC Object to current edited document. If there is no current document, the user is not prompted for a document, and 0 is returned.

Return type

GXEDOC

New in version 5.0.

License: Geosoft Open License

Limitations: May not be available while executing a command line program.

classmethod current_no_activate(type)[source]

This method returns the Current Edited Document.

Parameters

type (int) – EDOC_TYPE constants

Returns

GXEDOC Object

Return type

GXEDOC

New in version 9.0.

License: Geosoft Open License

Limitations: May not be available while executing a command line program.

Note: This function acts just like current except that the document is not activated (brought to foreground) and no

guarantee is given about which document is currently active.

classmethod get_documents_lst(lst, path, type)[source]

Load the file names of open documents into a GXLST.

Parameters
Returns

The number of documents loaded into the GXLST. The GXLST is cleared first.

Return type

int

New in version 5.0.

License: Geosoft Open License

Limitations: May not be available while executing a command line program.

get_name(name)[source]

Get the name of the document object of this GXEDOC.

Parameters

name (str_ref) – Name returned

New in version 5.0.

License: Geosoft Open License

Limitations: May not be available while executing a command line program.

get_window_position(left, top, right, bottom, state, is_floating)[source]

Get the map window’s position and dock state

Parameters

New in version 9.0.

License: Geosoft Open License

Limitations: May not be available while executing a command line program.

get_window_state()[source]

Retrieve the current state of the document window

Returns

EDOC_WINDOW_STATE constants

Return type

int

New in version 5.0.

License: Geosoft Open License

Limitations: May not be available while executing a command line program.

classmethod have_current(type)[source]

Returns true if a document is loaded

Parameters

type (int) – EDOC_TYPE constants

Return type

bool

New in version 5.0.

License: Geosoft Open License

Limitations: May not be available while executing a command line program.

is_null()[source]

Check if this is a null (undefined) instance

Returns

True if this is a null (undefined) instance, False otherwise.

Return type

bool

classmethod load(name, type)[source]

Loads a list of documents into the workspace

Parameters
  • name (str) – list of documents (‘;’ or ‘|’ delimited) to load.

  • type (int) – EDOC_TYPE constants

Returns

Handle to current edited document, which will be the last document in the list.

Return type

GXEDOC

New in version 5.0.

License: Geosoft Open License

Limitations: May not be available while executing a command line program.

Note: The last listed document will become the current document.

Only the first file in the list may have a directory path. All other files in the list are assumed to be in the same directory as the first file.

classmethod load_no_activate(name, type)[source]

Loads a list of documents into the workspace

Parameters
  • name (str) – list of documents (‘;’ or ‘|’ delimited) to load.

  • type (int) – EDOC_TYPE constants

Returns

Handle to current edited document, which will be the last document in the list.

Return type

GXEDOC

New in version 9.0.

License: Geosoft Open License

Limitations: May not be available while executing a command line program.

Note: This function acts just like load except that the document(s) is not activated (brought to foreground) and no

guarantee is given about which document is currently active.

classmethod loaded(name, type)[source]

Returns 1 if a document is loaded .

Parameters
Returns

1 if document is loaded, 0 otherwise.

Return type

int

New in version 5.0.

License: Geosoft Open License

Limitations: May not be available while executing a command line program.

make_current()[source]

Makes this GXEDOC object the current active object to the user.

New in version 5.0.

License: Geosoft Open License

Limitations: May not be available while executing a command line program.

classmethod null()[source]

A null (undefined) instance of GXEDOC

Returns

A null GXEDOC

Return type

GXEDOC

read_only()[source]

Checks if a document is currently opened in a read-only mode.

Return type

bool

New in version 5.0.

License: Geosoft Open License

Limitations: May not be available while executing a command line program.

set_window_position(left, top, right, bottom, state, is_floating)[source]

Get the map window’s position and dock state

Parameters

New in version 9.0.

License: Geosoft Open License

Limitations: May not be available while executing a command line program.

set_window_state(state)[source]

Changes the state of the document window

Parameters

state (int) – EDOC_WINDOW_STATE constants

New in version 5.0.

License: Geosoft Open License

Limitations: May not be available while executing a command line program.

classmethod sync(file, type)[source]

Syncronize the Metadata of a document that is not currently open

Parameters

New in version 5.0.

License: Geosoft Open License

Limitations: May not be available while executing a command line program.

sync_open()[source]

Syncronize the Metadata of a document

New in version 5.0.

License: Geosoft Open License

Limitations: May not be available while executing a command line program.

classmethod un_load(name, type)[source]

Unloads an edited document.

Parameters

New in version 5.0.

License: Geosoft Open License

Limitations: May not be available while executing a command line program.

Note: If the document is not loaded, nothing happens. Same as un_load_verify with FALSE to prompt save.

classmethod un_load_all(type)[source]

Unloads all opened documents

Parameters

type (int) – EDOC_TYPE constants

New in version 5.0.

License: Geosoft Open License

Limitations: May not be available while executing a command line program.

classmethod un_load_discard(name, type)[source]

Unloads a document in the workspace, discards changes.

Parameters

New in version 5.0.

License: Geosoft Open License

Limitations: May not be available while executing a command line program.

Note: If the document is not loaded, nothing happens.

classmethod un_load_verify(name, verify, type)[source]

Unloads an edited document, optional prompt to save.

Parameters

New in version 5.0.

License: Geosoft Open License

Limitations: May not be available while executing a command line program.

Note: If the document is not loaded, nothing happens. The user can be prompted to save before unloading. If EDOC_UNLOAD_NO_PROMPT, data is always saved.

EDOC_PATH constants

Four forms

EDOC_PATH_FULL

d:\directory\file.gdb

gxapi.EDOC_PATH_FULL = 0
EDOC_PATH_DIR

\directory\file.gdb

gxapi.EDOC_PATH_DIR = 1
EDOC_PATH_NAME_EXT

file.gdb

gxapi.EDOC_PATH_NAME_EXT = 2
EDOC_PATH_NAME

file

gxapi.EDOC_PATH_NAME = 3

EDOC_TYPE constants

Avaialable generic document types

EDOC_TYPE_GMS3D

GXGMSYS 3D Model

gxapi.EDOC_TYPE_GMS3D = 0
EDOC_TYPE_VOXEL

Voxel

gxapi.EDOC_TYPE_VOXEL = 1
EDOC_TYPE_VOXEL_INVERSION

Voxel Inversion

gxapi.EDOC_TYPE_VOXEL_INVERSION = 2
EDOC_TYPE_GMS2D

GXGMSYS 2D Model

gxapi.EDOC_TYPE_GMS2D = 3
EDOC_TYPE_GEOSURFACE

Geosurface

gxapi.EDOC_TYPE_GEOSURFACE = 4

EDOC_UNLOAD constants

What type of prompt

EDOC_UNLOAD_NO_PROMPT

No prompt

gxapi.EDOC_UNLOAD_NO_PROMPT = 0
EDOC_UNLOAD_PROMPT

Prompt

gxapi.EDOC_UNLOAD_PROMPT = 1

EDOC_WINDOW_POSITION constants

Window Positioning Options

EDOC_WINDOW_POSITION_DOCKED

Docked

gxapi.EDOC_WINDOW_POSITION_DOCKED = 0
EDOC_WINDOW_POSITION_FLOATING

Floating

gxapi.EDOC_WINDOW_POSITION_FLOATING = 1

EDOC_WINDOW_STATE constants

Window State Options

EDOC_WINDOW_RESTORE

Edoc window restore

gxapi.EDOC_WINDOW_RESTORE = 0
EDOC_WINDOW_MINIMIZE

Edoc window minimize

gxapi.EDOC_WINDOW_MINIMIZE = 1
EDOC_WINDOW_MAXIMIZE

Edoc window maximize

gxapi.EDOC_WINDOW_MAXIMIZE = 2

GMS3D_MODELTYPE constants

Avaialable model types

GMS3D_MODELTYPE_DEPTH

Depth Model

gxapi.GMS3D_MODELTYPE_DEPTH = 0
GMS3D_MODELTYPE_TIME

Time Model

gxapi.GMS3D_MODELTYPE_TIME = 1

GMS2D_MODELTYPE constants

Avaialable model types

GMS2D_MODELTYPE_DEPTH

Depth Model

gxapi.GMS2D_MODELTYPE_DEPTH = 0
GMS2D_MODELTYPE_TIME

Time Model

gxapi.GMS2D_MODELTYPE_TIME = 1