GXEDOC class¶
-
class
geosoft.gxapi.
GXEDOC
¶ The EDOC class provides access to a generic documents views as loaded within Oasis montaj.
-
static
create_new_gms_3d
((str)arg1, (int)arg2, (int)arg3, (int)arg4) → GXEDOC:¶ Creates a new GMSYS 3D Model into the workspace, flags as new.
Parameters: - arg1 (str) – Document to load.
- arg2 (int) – X Size
- arg3 (int) – Y Size
- arg4 (int) – GMS3D_MODELTYPE constants
Returns: Handle to the newly created edited model.
Return type: New in version 5.0.0.
Note:
See
geosoft.gxapi.GXEDOC.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.
-
static
current
((int)arg1) → GXEDOC:¶ This method returns the Current Edited Document.
Parameters: arg1 (int) – EDOC_TYPE constants Returns: EDOC Object Return type: geosoft.gxapi.GXEDOC
New in version 5.0.0.
-
static
current_if_exists
((int)arg1) → GXEDOC:¶ This method returns the Current Edited Document.
Parameters: arg1 (int) – EDOC_TYPE constants Returns: EDOC 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: geosoft.gxapi.GXEDOC
New in version 5.0.0.
-
static
current_no_activate
((int)arg1) → GXEDOC:¶ This method returns the Current Edited Document.
Parameters: arg1 (int) – EDOC_TYPE constants Returns: EDOC Object Return type: geosoft.gxapi.GXEDOC
New in version 9.0.0.
Note:
This function acts just like
geosoft.gxapi.GXEDOC.current()
except that the document is not activated (brought to foreground) and no guarantee is given about which document is currently active.
-
static
get_documents_lst
((GXLST)arg1, (int)arg2, (int)arg3) → int:¶ Load the file names of open documents into a LST.
Parameters: - arg1 (
geosoft.gxapi.GXLST
) – LST to load - arg2 (int) – EDOC_PATH constants
- arg3 (int) – EDOC_TYPE constants
Returns: The number of documents loaded into the LST. The LST is cleared first.
Return type: int
New in version 5.0.0.
- arg1 (
-
get_name
((str_ref)arg1) → None:¶ Get the name of the document object of this EDOC.
Parameters: arg1 ( geosoft.gxapi.str_ref
) – Name returnedReturns: Nothing Return type: None New in version 5.0.0.
-
get_window_position
((int_ref)arg1, (int_ref)arg2, (int_ref)arg3, (int_ref)arg4, (int_ref)arg5, (int_ref)arg6) → None:¶ Get the map window's position and dock state
Parameters: - arg1 (
geosoft.gxapi.int_ref
) – Window left position - arg2 (
geosoft.gxapi.int_ref
) – Window top position - arg3 (
geosoft.gxapi.int_ref
) – Window right position - arg4 (
geosoft.gxapi.int_ref
) – Window bottom position - arg5 (
geosoft.gxapi.int_ref
) – Window state EDOC_WINDOW_STATE constants - arg6 (
geosoft.gxapi.int_ref
) – Docked or floating EDOC_WINDOW_POSITION constants
Returns: Nothing
Return type: None
New in version 9.0.0.
- arg1 (
-
get_window_state
() → int:¶ Retrieve the current state of the document window
Returns: EDOC_WINDOW_STATE constants Return type: int New in version 5.0.0.
-
static
have_current
((int)arg1) → bool:¶ Returns true if a document is loaded
Parameters: arg1 (int) – EDOC_TYPE constants Returns: bool Return type: bool New in version 5.0.0.
-
is_null
() → bool¶ Check if the instance of
geosoft.gxapi.GXEDOC is null (undefined)
Returns: True if this is a null instance of geosoft.gxapi.GXEDOC
, False otherwise.Return type: bool`
-
static
load
((str)arg1, (int)arg2) → GXEDOC:¶ Loads a list of documents into the workspace
Parameters: - arg1 (str) – list of documents (‘;’ or ‘|‘ delimited) to load.
- arg2 (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.0.
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.
-
static
load_no_activate
((str)arg1, (int)arg2) → GXEDOC:¶ Loads a list of documents into the workspace
Parameters: - arg1 (str) – list of documents (‘;’ or ‘|‘ delimited) to load.
- arg2 (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.0.
Note:
This function acts just like
geosoft.gxapi.GXEDOC.load()
except that the document(s) is not activated (brought to foreground) and no guarantee is given about which document is currently active.
-
static
loaded
((str)arg1, (int)arg2) → int:¶ Returns 1 if a document is loaded .
Parameters: - arg1 (str) – document name
- arg2 (int) – EDOC_TYPE constants
Returns: 1 if document is loaded, 0 otherwise.
Return type: int
New in version 5.0.0.
-
make_current
() → None:¶ Makes this EDOC object the current active object to the user.
Returns: Nothing Return type: None New in version 5.0.0.
-
static
null
() → GXEDOC¶ A null (undefined) instance of
geosoft.gxapi.GXEDOC
Returns: A null geosoft.gxapi.GXEDOC
Return type: geosoft.gxapi.GXEDOC
-
read_only
() → bool:¶ Checks if a document is currently opened in a read-only mode.
Returns: bool Return type: bool New in version 5.0.0.
-
set_window_position
((int)arg1, (int)arg2, (int)arg3, (int)arg4, (int)arg5, (int)arg6) → None:¶ Get the map window's position and dock state
Parameters: - arg1 (int) – Window left position
- arg2 (int) – Window top position
- arg3 (int) – Window right position
- arg4 (int) – Window bottom position
- arg5 (int) – Window state EDOC_WINDOW_STATE constants
- arg6 (int) – Docked or floating EDOC_WINDOW_POSITION constants
Returns: Nothing
Return type: None
New in version 9.0.0.
-
set_window_state
((int)arg1) → None:¶ Changes the state of the document window
Parameters: arg1 (int) – EDOC_WINDOW_STATE constants Returns: Nothing Return type: None New in version 5.0.0.
-
static
sync
((str)arg1, (int)arg2) → None:¶ Syncronize the Metadata of a document that is not currently open
Parameters: - arg1 (str) – Document file name
- arg2 (int) – EDOC_TYPE constants
Returns: Nothing
Return type: None
New in version 5.0.0.
-
sync_open
() → None:¶ Syncronize the Metadata of a document
Returns: Nothing Return type: None New in version 5.0.0.
-
static
un_load
((str)arg1, (int)arg2) → None:¶ Unloads an edited document.
Parameters: - arg1 (str) – Name of document to unload
- arg2 (int) – EDOC_TYPE constants
Returns: Nothing
Return type: None
New in version 5.0.0.
Note:
If the document is not loaded, nothing happens. Same as
geosoft.gxapi.GXEDOC.un_load_verify()
with FALSE to prompt save.
-
static
un_load_all
((int)arg1) → None:¶ Unloads all opened documents
Parameters: arg1 (int) – EDOC_TYPE constants Returns: Nothing Return type: None New in version 5.0.0.
-
static
un_load_discard
((str)arg1, (int)arg2) → None:¶ Unloads a document in the workspace, discards changes.
Parameters: - arg1 (str) – Name of document to unload
- arg2 (int) – EDOC_TYPE constants
Returns: Nothing
Return type: None
New in version 5.0.0.
Note:
If the document is not loaded, nothing happens.
-
static
un_load_verify
((str)arg1, (int)arg2, (int)arg3) → None:¶ Unloads an edited document, optional prompt to save.
Parameters: - arg1 (str) – Name of document to unload
- arg2 (int) – EDOC_UNLOAD constants
- arg3 (int) – EDOC_TYPE constants
Returns: Nothing
Return type: None
New in version 5.0.0.
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.
-
static
EDOC_PATH constants¶
Four forms
-
gxapi.
EDOC_PATH_FULL
= 0¶
d:\directory\file.gdb
-
gxapi.
EDOC_PATH_DIR
= 1¶
\directory\file.gdb
-
gxapi.
EDOC_PATH_NAME_EXT
= 2¶
file.gdb
-
gxapi.
EDOC_PATH_NAME
= 3¶
file
EDOC_TYPE constants¶
Avaialable generic document types
-
gxapi.
EDOC_TYPE_GMS3D
= 0¶
GMSYS 3D Model
-
gxapi.
EDOC_TYPE_VOXEL
= 1¶
Voxel
-
gxapi.
EDOC_TYPE_VOXEL_INVERSION
= 2¶
Voxel Inversion
-
gxapi.
EDOC_TYPE_GMS2D
= 3¶
GMSYS 2D Model
EDOC_UNLOAD constants¶
What type of prompt
-
gxapi.
EDOC_UNLOAD_NO_PROMPT
= 0¶
-
gxapi.
EDOC_UNLOAD_PROMPT
= 1¶
EDOC_WINDOW_POSITION constants¶
Window Positioning Options
-
gxapi.
EDOC_WINDOW_POSITION_DOCKED
= 0¶
-
gxapi.
EDOC_WINDOW_POSITION_FLOATING
= 1¶
EDOC_WINDOW_STATE constants¶
Window State Options
-
gxapi.
EDOC_WINDOW_RESTORE
= 0¶
-
gxapi.
EDOC_WINDOW_MINIMIZE
= 1¶
-
gxapi.
EDOC_WINDOW_MAXIMIZE
= 2¶