GXEDOC class¶
-
class
GXEDOC
(handle=0)¶ GXEDOC class.
The
GXEDOC
class provides access to a generic documents views as loaded within Oasis montaj.-
classmethod
create_new_gms_3d
(name, nx, ny, type)¶ 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)¶ This method returns the Current Edited Document.
Parameters: type (int) – EDOC_TYPE constants Returns: GXEDOC
ObjectReturn 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)¶ 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)¶ This method returns the Current Edited Document.
Parameters: type (int) – EDOC_TYPE constants Returns: GXEDOC
ObjectReturn 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.
- Note: This function acts just like
-
classmethod
get_documents_lst
(lst, path, type)¶ Load the file names of open documents into a
GXLST
.Parameters: - lst (GXLST) –
GXLST
to load - 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.
- lst (GXLST) –
-
get_name
(name)¶ 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)¶ 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
()¶ 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)¶ 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
()¶ 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)¶ 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)¶ 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)¶ 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
()¶ 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
()¶ 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)¶ 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)¶ 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)¶ 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
()¶ 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)¶ 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)¶ 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)¶ 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)¶ 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.
-
classmethod
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_VOXEL
¶ Voxel
-
gxapi.
EDOC_TYPE_VOXEL
= 1
-
-
EDOC_TYPE_VOXEL_INVERSION
¶ Voxel Inversion
-
gxapi.
EDOC_TYPE_VOXEL_INVERSION
= 2
-
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
-