GXEDOC class¶
- class GXEDOC(handle=0)[source]¶
GXEDOC class.
The
GXEDOC
class provides access to a generic documents views as loaded within Oasis montaj.- copy(output)[source]¶
Copies a managed document to another document.
- Parameters:
output (str) – Name of output document
- Return type:
bool
New in version 2022.1.
License: Geosoft Open License
Limitations: May not be available while executing a command line program.
Note: Copies a managed document to another document.
- classmethod create_new_gms_3d(name, nx, ny, type)[source]¶
Creates a new
GXGMSYS
3D Model into the workspace, flags as new.- Parameters:
name (str) – Document to load.
nx (int) – X Size
ny (int) – Y Size
type (int) – GMS3D_MODELTYPE constants
- Returns:
Handle to the newly created edited model.
- Return type:
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:
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:
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:
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:
path (int) – EDOC_PATH constants
type (int) – EDOC_TYPE constants
- Returns:
The number of documents loaded into the
GXLST
. TheGXLST
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:
left (int_ref) – Window left position
top (int_ref) – Window top position
right (int_ref) – Window right position
bottom (int_ref) – Window bottom position
state (int_ref) – Window state EDOC_WINDOW_STATE constants
is_floating (int_ref) – Docked or floating EDOC_WINDOW_POSITION constants
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:
- 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:
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:
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:
name (str) – document name
type (int) – EDOC_TYPE constants
- 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.
- 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.
- save()[source]¶
Save the managed document.
New in version 2022.1.
License: Geosoft Open License
Limitations: May not be available while executing a command line program.
Note: Save the managed document
- set_window_position(left, top, right, bottom, state, is_floating)[source]¶
Get the map window’s position and dock state
- Parameters:
left (int) – Window left position
top (int) – Window top position
right (int) – Window right position
bottom (int) – Window bottom position
state (int) – Window state EDOC_WINDOW_STATE constants
is_floating (int) – Docked or floating EDOC_WINDOW_POSITION constants
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:
file (str) – Document file name
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.
- 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:
name (str) – Name of document to unload
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.
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:
name (str) – Name of document to unload
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.
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:
name (str) – Name of document to unload
verify (int) – EDOC_UNLOAD constants
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.
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_TYPE constants¶
Avaialable generic document types
EDOC_UNLOAD constants¶
What type of prompt
EDOC_WINDOW_POSITION constants¶
Window Positioning Options
EDOC_WINDOW_STATE constants¶
Window State Options
GMS3D_MODELTYPE constants¶
Avaialable model types
GMS2D_MODELTYPE constants¶
Avaialable model types