geosoft.gxpy.om submodule¶
Geosoft Desktop dependent functions.
-
exception
geosoft.gxpy.om.
OMException
¶ Bases:
Exception
Exceptions from this module.
New in version 9.1.
-
geosoft.gxpy.om.
get_user_input
(title='Input required...', prompt='?', kind='string', default='', items='', filemask='')¶ Display a dialog prompt on the Geosoft Desktop and wait for user input. This method depends on “user_input.gx” and can only be used from an extension running inside a Geosoft Desktop application.
Parameters: - title – dialog box title. A description can be added as a second-line using a line-break. example: “Your title/nDescriptive help”
- prompt – prompt string to
- kind – kind of response required: ‘string’, ‘int’, ‘float’, ‘file’, ‘colour’ or ‘list’
- items – comma-separated string or list/tupple of items for a list
- default – default value. For multifile can be a string (‘|’ delimiter) or list/tupple.
- filemask – File type mask ‘.dat’, ‘.dat,.grd’, ‘**,*.grd’ for multiple files Comma delimited, or a list/tupple
Returns: user response
Raise: :py:ex:GXCancel if the user cancels the dialog
New in version 9.1.
Returns Oasis montaj menu information as a dictionary:
{ 'default': [list of default menus] 'loaded': [list of loaded menus] 'user': [list of user menus] }
New in version 9.1.
-
geosoft.gxpy.om.
pause
(title='Pause...', cancel=False)¶ Display a pause dialog, wait for user to press continue or cancel :param title: The pause dialog title, default is “Pause...” :param cancel: If True, show a cancel button :raises: :py:ex:GXCancel if the user cancels the dialog
New in version 9.1.
-
geosoft.gxpy.om.
running_script
()¶ Returns: 1 if running from a script, 0 if running interactively. New in version 9.1.
-
geosoft.gxpy.om.
state
()¶ Return a dictionary that contains the current Oasis montaj state:
{ 'gdb' { 'open_list': [list of open databases] 'current': current database name 'disp_chan_list': [ list of channels in the database 'selection': [ line, channel, start_fid, end_fid] # line is "*" if all lines selected # channel is '' if no channel selected # start_fid is '' if no fiducials selected # start_fid is '*' is all fiducials selected } 'map' { 'open_list': [list of open maps] 'current': current map name 'point': [ x, y, z] 'cursor': [ x, y, z] 'display_area':[ xmin, ymin, xmax, ymax] } }
New in version 9.1.
-
geosoft.gxpy.om.
user_message
(title, message)¶ Display a message to the user :param title: message box title :param message: message
New in version 9.1.