GXSYS class¶
-
class
GXSYS
(handle=0)¶ GXSYS class.
The
GXSYS
library functions perform a wide range functions, including the storage and retrieval of named parameters from the current workspace; writing messages to the user; display of progress bars; retrieving file, date and time information from the operating system; and providing warning and error handling functions.Note:
PARAMETER CONTROL FUNCTIONS
Parameters can be named with an index extension. For example, a parameter could be named as “PARM[1]”. The index can be a positive number, or it can be a ‘*’.
If the index is a ‘*’ in
set_string
, then the value string will be parsed into multiple values. Commas are assumed to be delimiters.E.g.
"group1", "multiparm[*]", "value1,\"value,2\",\"value 3\", value4 ,\"value 5 \""
Will set:
multiparm[0] ="value1" multiparm[1] ="value,2" multiparm[2] ="value 3" multiparm[3] ="value4" multiparm[4] ="value 5"
To read a parameter, name the parameter with the index. There is no looped-reading ability. For example using the following with
gt_string
:"group1","multiparm[3]",setting
will return:
setting = "value4"
-
classmethod
abort
(message)¶ This method terminates the execution of a script. A message giving the reason for the abort will be displayed along with the line number where we stopped in the script.
Parameters: message (str) – Message to display New in version 5.0.
License: Geosoft Open License
-
classmethod
absolute_file_name
(abbr, name)¶ Convert an abbreviated path name to a full path name.
Parameters: - abbr (str) – Input file name to resolve
- name (str_ref) – Output name, can be the same as input
New in version 5.0.
License: Geosoft Open License
Note: This is mainly intended to convert ”.name” to a full name at run-time.
-
classmethod
add_lineage_parameter
(name, value)¶ Add a parameter to the current lineage object
Parameters: - name (str) – Paramter Name
- value (str) – Parameter Value
New in version 7.0.
License: Geosoft Open License
-
classmethod
add_lineage_source
(source_type, source_name)¶ Add a source to the current lineage object
Parameters: - source_type (int) – SYS_LINEAGE_SOURCE constants
- source_name (str) – Source Name
New in version 7.0.
License: Geosoft Open License
-
classmethod
assert_
(exp)¶ Abort with GX line number if not true.
Parameters: exp (int) – Expression to evaluate (0 aborts) New in version 5.0.
License: Geosoft Open License
-
classmethod
assert_gx
(exp, mod, parm)¶ DLL function argument error assertion
Parameters: - exp (int) – Boolean expression (ie. (dB != 0.0) )
- mod (str) – Module name
- parm (str) – Argument name
Returns: 0 assertion passed 1 assertion failed
Return type: int
New in version 5.0.
License: Geosoft Open License
Note: Use this function to evaluate errors in passed function arguments. Functions called by GX programs should be tolerant of all errors in the passed argument list. The
assert_gx
can be used to test each argument before doing any work in the function. If an assertion fails, an error will be registered with the name of the function and the parameter name and a 1 will be returned. The caller should immediatley cleaning up (if necessary) and return.You could also test the validity of arguments and call the
error
,error_tag
andterminate
functions if you would like to provide a more specific error message.
-
classmethod
backup_geo_file
(data, target)¶ Backup a Geosoft data file and all associated files to a temporary folder.
Parameters: - data (str) – File Name
- target (str_ref) – Buffer to place the target name into
New in version 7.0.
License: Geosoft End-User License
Note: Grids are copied and the GI’s are maintained - note that support for non-geosoft grids is limited since this method does not guarantee all grid files besides the main one are copied.
-
classmethod
break_date
(date, year, month, day)¶ Breaks a decimal date value into year, month and day.
Parameters: New in version 5.1.1.
License: Geosoft Open License
-
classmethod
cancel_
()¶ This method indicates that the GX program terminated without doing anything of interest and should be ignored. In particular, the GX will not be logged in a recorded GS.
New in version 5.0.
License: Geosoft Open License
-
classmethod
check_arc_license
()¶ Check to see if a ESRI ArcEngine or ArcView license is available
Returns: 1 - Licenced 0 - Not licenced Return type: int New in version 7.1.
License: Geosoft Open License
-
classmethod
check_arc_license_ex
(version)¶ Check to see if a ESRI ArcEngine or ArcView license is available, returns type and version of available engine.
Parameters: version (str_ref) – Version String Returns: ARC_LICENSE constants Return type: int New in version 9.0.
License: Geosoft Open License
-
classmethod
check_intrinsic
(cl, name)¶ Check to see if an intrinsic object is licensed
Parameters: - cl (int) – Intrinsic Class Number
- name (str) – Intrinsic Name (must be exact)
Returns: 1 - Licenced 0 - Not licenced
Return type: int
New in version 6.0.
License: Geosoft Open License
-
classmethod
check_stop
()¶ This method is called at convenient points in the GX code to check if the user has asked the script to stop running. This method should be called by any GX program that may take a while to complete.
Returns: 0 - No 1 - Yes, Terminate processing. Return type: int New in version 5.0.
License: Geosoft Open License
-
classmethod
clear_err_ap
()¶ This method is called at to clear all registered errors.
Returns: 0 - Successful Return type: int New in version 5.1.1.
License: Geosoft Open License
-
classmethod
clear_group
(group)¶ Clear current contents of a group
Parameters: group (str) – Group to clear New in version 5.0.
License: Geosoft Open License
-
classmethod
clear_group_parm
(group)¶ Clears all paramters in a specified group.
Parameters: group (str) – String New in version 5.1.1.
License: Geosoft Open License
-
classmethod
clear_lineage_parameters
()¶ Clear all the lineage parameters
New in version 7.0.
License: Geosoft Open License
-
classmethod
clear_lineage_sources
()¶ Clear all the lineage sources
New in version 7.0.
License: Geosoft Open License
Clear all menus
Parameters: flag (int) – SYS_MENU_CLEAR constants New in version 5.0.
License: Geosoft Open License
Limitations: May not be available while executing a command line program.
-
classmethod
clear_parm
()¶ Clears all paramters.
New in version 5.0.
License: Geosoft Open License
-
classmethod
clipboard_to_file
(file)¶ Copy text from the clipboard to a file.
Parameters: file (str) – File name to place it into New in version 5.0.
License: Geosoft Open License
-
classmethod
copy_file
(src_file, dest_file)¶ Copy a file.
Parameters: - src_file (str) – Source file
- dest_file (str) – Destination file
Returns: 0 if file copied ok. 1 if unable to copy file or source file not found.
Return type: int
New in version 5.1.8.
License: Geosoft Open License
-
classmethod
copy_geo_file
(data, dir)¶ Copy a Geosoft data file and all associated files to a new folder
Parameters: - data (str) – File Name
- dir (str) – Target directory
New in version 7.0.
License: Geosoft End-User License
Note: Grids are copied and the GI’s are maintained - note that support for non-geosoft grids is limited since this method does not guarantee all grid files besides the main one are copied.
-
classmethod
crc_file
(file)¶ Compute the CRC of a file
Parameters: file (str) – File Name Returns: CRC Value Return type: int New in version 6.0.1.
License: Geosoft Open License
-
classmethod
crc_file_offset
(file, offset)¶ Compute the CRC of a file with an Offset
Parameters: - file (str) – File Name
- offset (int) – Offset in the file (0 for start)
Returns: CRC Value
Return type: int
New in version 6.4.
License: Geosoft Open License
-
classmethod
create_clipboard_ra
()¶ Create a
GXRA
to read text from the clipboard.Returns: GXRA
to use for reading.Return type: GXRA New in version 5.0.
License: Geosoft Open License
Note: Destroy the
GXRA
as soon as possible. As long as it open the clipboard is not accessible from any application.
-
classmethod
create_clipboard_wa
()¶ Create a
GXWA
to write text on the clipboard.Returns: GXWA
to use for reading.Return type: GXWA New in version 5.0.
License: Geosoft Open License
Note: Destroy the
GXWA
as soon as possible. As long as it open the clipboard is not accessible from any application.
-
classmethod
date
()¶ Returns the current date in decimal years.
Returns: Date in decimal years. Return type: float New in version 5.0.
License: Geosoft Open License
Note: The FormatDate_STR function can be used to convert a date to a string.
-
classmethod
dateto_long
(date)¶ Converts a double date to a value representing total days elapsed since day 0 of year 0. This uses the Numerical Receipies Julian function.
Parameters: date (float) – Date Returns: x - Days Return type: int New in version 6.3.
License: Geosoft Open License
-
classmethod
decrypt_string
(input, output, key)¶ Decrypts a string that has been previously encrypted by
encrypt_string
.Parameters: - input (str) – Input string for decryption.
- output (str_ref) – Output buffer for decrypted result.
- key (int) – SYS_ENCRYPTION_KEY constants
New in version 9.0.
License: Geosoft Open License
-
classmethod
default_double
(group, field, val)¶ Allows a default real to be set.
Parameters: - group (str) – Group Name
- field (str) – Parameter Name
- val (float) – Real Value to Set
New in version 6.0.
License: Geosoft Open License
Note: The value will only be set if there is no existing setting.
-
classmethod
default_int
(group, field, val)¶ Allows a default int to be set.
Parameters: - group (str) – Group Name
- field (str) – Parameter Name
- val (int) – Int Value to Set
New in version 6.0.
License: Geosoft Open License
Note: The value will only be set if there is no existing setting.
-
classmethod
default_string
(group, field, val)¶ Allows a default string to be set.
Parameters: - group (str) – Group Name
- field (str) – Parameter Name
- val (str) – String to Set it To
New in version 6.0.
License: Geosoft Open License
Note: The value will only be set if there is no existing setting.
-
classmethod
delay
(secs)¶ Idle delay method.
Parameters: secs (float) – Decimal Seconds to delay Returns: Success if the delay has elapsed. Return type: int New in version 6.0.
License: Geosoft Open License
-
classmethod
delete_file
(file)¶ Delete a file.
Parameters: file (str) – Name of file to delete Returns: 0 if file deleted. 1 if unable to find file or delete file. Return type: int New in version 5.0.
License: Geosoft Open License
-
classmethod
delete_gi_file
(file)¶ Delete the GI file associated with a grid.
Parameters: file (str) – Name of grid file to delete Returns: 0 if file deleted. 1 if file is not found, or found but could not be deleted. This is a “one-line” function to take a grid file name, remove the qualifiers, add the ”.gi” and delete the file.
Return type: int New in version 5.0.
License: Geosoft Open License
-
classmethod
delete_grid_file
(file)¶ Delete a grid file and its associated GI and XML files.
Parameters: file (str) – Name of grid file to delete Returns: 0 if grid file deleted. 1 if grid file not found or if one or more files is found but could not be deleted. Return type: int New in version 7.0.
License: Geosoft Open License
Note: Deletes the grid file first, and, if they exist, the associated GI and XML files. No error is registered if a file is not found or cannot be deleted.
-
classmethod
destroy_ptmp
(ptmp)¶ Destroy PTMP.
Parameters: ptmp (int) – PTMP object to destroy New in version 5.0.
License: Geosoft Open License
-
classmethod
dir_exist
(dir)¶ Check to see if a directory exists
Parameters: dir (str) – Name of directory to check Returns: 0 - Directory doesn’t exist 1 - Directory exists Return type: int New in version 5.0.
License: Geosoft Open License
-
classmethod
disable_gx_debugger
()¶ Disable GX Debugger
GXGUI
if activeNew in version 5.0.
License: Geosoft Open License
Note: All breakpoints will be cleared by this call.
-
classmethod
display_double
(title, real)¶ Display a real number.
Parameters: - title (str) – Title of the Window
- real (float) – Number
New in version 5.0.
License: Geosoft Open License
Limitations: May not be available while executing a command line program.
-
classmethod
display_help
(group, topic)¶ Display the help dialog with the specified topic highlighted
Parameters: - group (str) – Group string to lookup in gxhelp.ini
- topic (str) – Index string to lookup in gxhelp.ini
New in version 5.0.
License: Geosoft Open License
Limitations: May not be available while executing a command line program.
-
classmethod
display_help_topic
(file, topic)¶ Display the help dialog without topic lookup in INI files
Parameters: - file (str) – Help File (blank for default)
- topic (str) – Help Topic
New in version 5.0.
License: Geosoft Open License
Limitations: May not be available while executing a command line program.
-
classmethod
display_int
(title, int)¶ Display an integer.
Parameters: - title (str) – Title of the Window
- int (int) – Number
New in version 5.0.
License: Geosoft Open License
Limitations: May not be available while executing a command line program.
-
classmethod
display_message
(title, message)¶ Display a user message.
Parameters: - title (str) – Title of the Window
- message (str) – Message String
New in version 5.0.
License: Geosoft Open License
Limitations: May not be available while executing a command line program.
-
classmethod
display_question
(title, message)¶ Display a YES/NO type question. This method waits for the user to hit YES or NO.
Parameters: - title (str) – Title of the window
- message (str) – Message String
Returns: 0 - user selected No 1 - user selected YES
Return type: int
New in version 5.0.
License: Geosoft Open License
Limitations: May not be available while executing a command line program.
-
classmethod
display_question_with_cancel
(title, message)¶ Display a YES/NO/CANCEL type question. This method waits for the user to hit YES or NO or CANCEL.
Parameters: - title (str) – Title of the window
- message (str) – Message String
Returns: 0 - user selected No 1 - user selected YES 2 - user selected CANCEL
Return type: int
New in version 5.0.
License: Geosoft Open License
Limitations: May not be available while executing a command line program.
-
classmethod
display_task_dialog_ui
(title, main_instruction, content, common_buttons, custom_button_lst, icon, footer, footer_icon, verification_check_text, verification_checked, expanded_information, collapsed_control_text, expanded_control_text)¶ Show a Windows TaskDialog UI (see https://msdn.microsoft.com/en-us/library/windows/desktop/bb760441(v=vs.85).aspx).
Parameters: - title (str) – Title
- main_instruction (str) – Main instruction (empty string for none)
- content (str) – Content (empty string for none)
- common_buttons (int) – Common Buttons, one of TD_BUTTON constants
- custom_button_lst (GXLST) – Optional
GXLST
of custom buttons. Name inGXLST
will be used for button text, while value should be an int to return. Pass (GXLST
)0 to only use standard button flags. - icon (int) – Icon TD_ICON constants
- footer (str) – Footer (empty string for none)
- footer_icon (int) – Footer Icon TD_ICON constants
- verification_check_text (str) – Verification checkbox text (empty string for none)
- verification_checked (int_ref) – Verification checkbox checked (in/out)
- expanded_information (str) – Expanded information (empty string for none)
- collapsed_control_text (str) – Collapsed control text for expanded information (empty string for default; ‘More’)
- expanded_control_text (str) – Expanded control text for expanded information (empty string for default; ‘Less’)
Returns: Button ID. One of TD_ID constants or the int value from
GXLST
of custom buttons.Return type: int
New in version 9.3.
License: Geosoft Open License
-
classmethod
do_command
(command)¶ Execute an Oasis montaj command.
Parameters: command (str) – Command New in version 5.0.
License: Geosoft Open License
Limitations: May not be available while executing a command line program.
Note: Commands syntax: “[type] command”
type command ID Internal Menu Command (as found in omn and geobar files e.g. *ID_EDIT_SELECT
)GX gx file name GS gs file name DOTNET dll file name Use qualifiers to specify class and method e.g.: "[DOTNET] geogxnet.dll(Geosoft.GX.NewGDB.NewGDB;Run)"
PDF Geosoft pdf file name (Not Adobe PDF document, a legacy Geosoft Sushi script) DOS DOS style command HLP help file name The must be ONE space between the “]” and the command. For example:
"[ID] ID_EDIT_SELECT"
// bring up the line edit toolSee also
-
classmethod
emf_object_size
(file, size_x, size_y)¶ Get the size of an EMF object
Parameters: New in version 6.4.
License: Geosoft Open License
-
classmethod
enable_gx_debugger
(src_dir, first_gx)¶ Enable GX Debugger
GXGUI
Parameters: - src_dir (str) – Path that will be scanned recursively for GXC source files
- first_gx (str) – Name of gx where first breakpoint should be set
New in version 5.0.
License: Geosoft Open License
Note: Takes as input two strings one a path that will be scanned recursively for GXC source files and a second string without a path of the GX where the first breakpoint should be set in (i.e. “gxname.gx”). The source of the GX should be found in the path (e.g. <path>somewheregxname.gxc) and a breakpoint will be set on the first executing line of this GX. Make sure the GX binary is newer than the source file, otherwise unexpected results may occur. As soon as the GX is run the
GXGUI
will become visible and it will be possible to set more breakpoints in any of the GXC files found in the path.
-
classmethod
encrypt_string
(input, output, key)¶ Encrypts a string for secure storage in configuration files or in the workspace parameters.
Parameters: - input (str) – Input string for encryption.
- output (str_ref) – Output buffer for encrypted result.
- key (int) – SYS_ENCRYPTION_KEY constants
New in version 9.0.
License: Geosoft Open License
-
classmethod
error
(error_file, module, error)¶ Register an error message
Parameters: - error_file (str) – Your error file name, “” if none.
- module (str) – Module name in which error occurred.
- error (int) – Error number
New in version 5.0.
License: Geosoft Open License
Note: Use this function to register your own error messages when an error occurs in your code. Your errors can be provided in your own
GXGER
file. See GEOSOFT.`GXGER <geosoft.gxapi.GXGER>` for an example of theGXGER
file format.If the error # is not found in your error file, the OE32.`GXGER <geosoft.gxapi.GXGER>` file, then the GEOSOFT.`GXGER <geosoft.gxapi.GXGER>` file will be searched.
-
classmethod
error_tag
(tag, set)¶ Set an error message tag string
Parameters: - tag (str) – Tag string, ie “%1”.
- set (str) – String to replace the tag.
New in version 5.0.
License: Geosoft Open License
Note: Use this method to replace tag strings in your error message text with run-time information. For example, Geosoft error messages often use the tag strings “%1”, “%2”, etc. as place holders to be replaced by a string which is only known at run-time.
-
classmethod
exist_double
(group, field)¶ This method checks to see if a real parameter exists.
Parameters: - group (str) – Group Name
- field (str) – Parameter Name
Returns: 1 - Yes 0 - No
Return type: int
New in version 7.2.
License: Geosoft Open License
-
classmethod
exist_env
(parm)¶ Check if setting exists in environment.
Parameters: parm (str) – Setting Returns: 1 - Yes 0 - No Return type: int New in version 5.0.
License: Geosoft Open License
-
classmethod
exist_int
(group, field)¶ This method checks to see if a int parameter exists.
Parameters: - group (str) – Group Name
- field (str) – Parameter Name
Returns: 1 - Yes 0 - No
Return type: int
New in version 7.2.
License: Geosoft Open License
-
classmethod
exist_string
(group, field)¶ This method checks to see if a string parameter exists.
Parameters: - group (str) – Group Name
- field (str) – Parameter Name
Returns: 1 - Yes 0 - No
Return type: int
New in version 7.2.
License: Geosoft Open License
-
classmethod
exit_
()¶ This method terminates the execution of a script in a regular fashion with no error messages displayed.
New in version 5.0.
License: Geosoft Open License
-
classmethod
file_date
(file)¶ File creation date in decimal years.
Parameters: file (str) – File name Returns: Date in decimal years, rDUMMY
if the file does not exist.Return type: float New in version 5.0.
License: Geosoft Open License
Note: The FormatDate_STR function can be used to convert a date to a string.
-
classmethod
file_exist
(file)¶ Check to see if a file exists
Parameters: file (str) – Name of file to check Returns: 0 - File doesn’t exist 1 - File exists Return type: int New in version 5.0.
License: Geosoft Open License
Note: Use the FULL path for the file name. If the full path is not specified, then the current working directory is used for the path.
-
classmethod
file_ren
(old_file, new_file)¶ Rename a file
Parameters: - old_file (str) – Old file name
- new_file (str) – New file name
New in version 5.0.
License: Geosoft Open License
-
classmethod
file_size
(file)¶ Returns size of a file.
Parameters: file (str) – Name of file Returns: 0 none/error x Size Return type: int New in version 5.0.
License: Geosoft Open License
-
classmethod
file_time
(file)¶ File creation time in decimal hours.
Parameters: file (str) – File name Returns: Date in decimal hours, rDUMMY
if the file does not exist.Return type: float New in version 5.0.
License: Geosoft Open License
Note: The FormatTime_STR function can be used to convert a time to a string.
-
classmethod
file_to_clipboard
(file)¶ Copy a text file onto the clipboard as text.
Parameters: file (str) – File place into clipboard New in version 5.0.
License: Geosoft Open License
-
classmethod
file_writable
(file)¶ Check if a file can be created or opened in read-write mode at a specific location
Parameters: file (str) – File path name to check Return type: bool New in version 6.2.
License: Geosoft Open License
-
classmethod
filter_parm_group
(group, add)¶ Controls filtering of specific group during logging.
Parameters: - group (str) – Group Name
- add (int) – 0 - Clear filter, 1 - Add filter
New in version 9.1.
License: Geosoft Open License
Note: This is useful to prevent certain utility GX parameters from being recorded during GS script runs where the parameters does not influence the actual script execution.
-
classmethod
find_files_vv
(vv, mask)¶ Fill a
GXVV
with files matching an input file mask.Parameters: New in version 5.0.
License: Geosoft Open License
Note: Fill a
GXVV
with files matching the input file mask. TheGXVV
should be of string type.
-
classmethod
find_path
(file, mode, fullname)¶ Get full path for a file with Geosoft subdirectory parameter.
Parameters: - file (str) – File to get path name for
- mode (int) – SYS_SEARCH_PATH constants
- fullname (str_ref) – Buffer to place path name into
Returns: 0 if file found. 1 if file not found.
Return type: int
New in version 6.0.1.
License: Geosoft Open License
Note: Directories can be resolved from the Environment section of the Geosoft registry, or from system environment variables that are not defined in the Geosoft Environment registry. The following file prefixes will be replaced by the environment settings:
<geosoft> the main Geosoft installation directory <geosoft2> the secondary Geosoft installation directory <geotemp> the Geosoft temporary file directory <windows> the operating system Windows directory <system> the operating system system directory <other> other environment variables
-
classmethod
find_path_ex
(file, mode, dir_mode, fullname)¶ Get full path for a file.
Parameters: - file (str) – File to get path name for
- mode (int) – SYS_SEARCH_PATH constants
- dir_mode (int) – GEO_DIRECTORY constants
- fullname (str_ref) – Buffer to place path name into
Returns: 0 if file found. 1 if file not found.
Return type: int
New in version 6.0.1.
License: Geosoft Open License
Note: Directories can be resolved from the Environment section of the Geosoft registry, or from system environment variables that are not defined in the Geosoft Environment registry. The following file prefixes will be replaced by the environment settings:
<geosoft> the main Geosoft installation directory <geosoft2> the secondary Geosoft installation directory <geotemp> the Geosoft temporary file directory <windows> the operating system Windows directory <system> the operating system system directory <other> other environment variable
-
classmethod
font_lst
(lst, which)¶ List all Windows and geosoft fonts.
Parameters: - lst (GXLST) – List Object
- which (int) – SYS_FONT constants
New in version 5.0.
License: Geosoft Open License
Note: To get TT and GFN fonts, call twice with the same list and
SYS_FONT_TT
, thenSYS_FONT_GFN
, or vice-versa to change order of listing.
-
classmethod
generate_guid
(guid)¶ Genrates a GUID string (e.g. {4FEDE8BF-CDAB-430A-8026-1CCC0EC0A2EB})
Parameters: guid (str_ref) – GUID New in version 8.4.
License: Geosoft Open License
-
classmethod
get_directory
(sys_dir, dir)¶ Get a directory path
Parameters: - sys_dir (int) – SYS_DIR constants
- dir (str_ref) – Returned directory path string
New in version 5.0.
License: Geosoft Open License
Note: The path will always end with the file separator character
-
classmethod
get_dot_net_gx_entries
(gx, entry_buffer)¶ Get the list of entry points that this assembly has exposed to Oasis montaj.
Parameters: - gx (str) – Name of .NET GX assembly
- entry_buffer (str_ref) – Buffer to place list of entries in
Returns: 0 success 1 error.
Return type: int
New in version 6.0.1.
License: Geosoft Open License
Note: The list of entry points are passed back as one string with each entry point separated by a semi-colon. For example: NewGDB|Run;NewGDB|RunEx
-
classmethod
get_double
(group, field)¶ This method returns a real from the parameter block.
Parameters: - group (str) – Group Name
- field (str) – Parameter Name
Returns: Real Value,
rDUMMY
if parameter not set.Return type: float
New in version 6.0.1.
License: Geosoft Open License
-
classmethod
get_entitlement_rights
(lst_rights)¶ Get the Entitlement Rights
Parameters: lst_rights (GXLST) – Rights New in version 9.0.
License: Geosoft Open License
-
classmethod
get_env
(parm, set)¶ Get an environment setting.
Parameters: - parm (str) – Setting
- set (str_ref) – Value string
New in version 5.0.
License: Geosoft Open License
-
classmethod
get_error_message_ap
(err, err_str)¶ Return the error message text as a string.
Parameters: - err (int) – The error index (0 to N-1, where N=number of registered errors)
- err_str (str_ref) – Buffer to return message in
New in version 6.0.
License: Geosoft Open License
Note: This wrapper is mostly for use outside of GXs, because in general if an error is registered in a GX the GX would terminate before it could be called. Use
num_errors_ap
to get the number of registered errors.
-
classmethod
get_geodist
()¶ Gets a global flag that indicates whether we are running within the geodist library
Returns: 0 - Geodist not loaded, 1 - Geodist loaded Return type: int New in version 6.3.
License: Geosoft Open License
-
classmethod
get_int
(group, field)¶ This method returns an int from the parameter block.
Parameters: - group (str) – Group Name
- field (str) – Parameter Name
Returns: Int Value,
iDUMMY
if the parameter is not set.Return type: int
New in version 6.0.1.
License: Geosoft Open License
-
classmethod
get_license_class
(cl)¶ Get the current application license class.
Parameters: cl (str_ref) – Class String New in version 6.1.
License: Geosoft Open License
Note: String may be one of : “ArcGIS” “OasisMontaj” “DapServer”
-
classmethod
get_licensed_user
(user, company)¶ Get the licensed user name and Company
Parameters: New in version 6.0.
License: Geosoft Open License
Get the loaded menus.
Parameters: New in version 9.0.
License: Geosoft Open License
Limitations: May not be available while executing a command line program.
Note: The names of the LSTs contain the menus and the values contain any exclusions. Exclusions are semicolon separated top level menu names and/or toolbar.geobar file names.
-
classmethod
get_path
(type, path)¶ Get a Geosoft path
Parameters: - type (int) – SYS_PATH constants
- path (str_ref) – String in which to place path
New in version 5.0.
License: Geosoft Open License
Note: The path name will have a directory separator at the end.
-
classmethod
get_pattern
(group, pat, size, thick, dense, col, back_col)¶ Gets pattern parameters from the parameter block.
Parameters: New in version 6.4.
License: Geosoft Open License
Note: Gets all the user-definable pattern parameters from a specified group. Parameters are: “PAT_NUMBER” 0 is solid fill (default) “PAT_SIZE” pattern tile size in mm. (can return
iDUMMY
) “PAT_THICKNESS” pattern line thickness in percent of the tile size. valid range is 0-100. “PAT_DENSITY” Tile spacing. A value of 1 means tiles are laid with no overlap. A value of 2 means they overlap each other. “PAT_COLOR” The color value. “PAT_BACKCOLOR” Background color value.Returned values may be DUMMY, but will be acceptable for use with the
GXGUI.color_form
function, to set defaults.
-
classmethod
get_ptmp
(ptmp)¶ Get temporary saves copy of parameter block.
Parameters: ptmp (int) – Saved with Save_PTMP_SYS New in version 5.0.
License: Geosoft Open License
See also
-
classmethod
get_reg
(reg, group)¶ Get
GXREG
parameters.Parameters: New in version 5.0.
License: Geosoft Open License
-
classmethod
get_settings_meta
(meta)¶ Get the settings metadata object.
Parameters: meta (GXMETA) – GXMETA
object to store the settings metadata inNew in version 6.0.
License: Geosoft Open License
-
classmethod
get_sys_info
(sys_info, info)¶ Get system information
Parameters: - sys_info (int) – SYS_INFO constants
- info (str_ref) – Returned setting
New in version 5.0.
License: Geosoft Open License
-
classmethod
get_thread_id
()¶ Get the ID the current thread.
Returns: x - ID Return type: int New in version 5.1.6.
License: Geosoft Open License
Note: In a single threaded application this will always be 0.
-
classmethod
get_timer
(flag, start_time, elapsed_time)¶ Return the elapsed time since the established time.
Parameters: Returns: Success if the delay has elapsed.
Return type: int
New in version 6.0.
License: Geosoft Open License
Note: 1st time through call the method with a flag of 1 to identify the count start time, subsequent times the time will be the time elapsed since the queried start time. Do so by settign the flag to 0.
-
classmethod
get_top_error_ap
()¶ Get the error number of the last registered error.
Returns: The top error number registered, 0 if none registered. Return type: int New in version 8.0.
License: Geosoft Open License
-
classmethod
get_windows_dir
(dir)¶ Get the Windows directory path
Parameters: dir (str_ref) – Buff for directory path string New in version 5.0.
License: Geosoft Open License
-
classmethod
get_workspace_reg
(reg)¶ Get a copy of the workspace
GXREG
;Parameters: reg (GXREG) – GXREG
objectNew in version 5.0.
License: Geosoft Open License
Note: The workspace
GXREG
is separate from the reg used to storeGXSYS
parameters.Because
get_workspace_reg
returns a copy of the workspaceGXREG
, and not the workspaceGXREG
itself, you must callset_workspace_reg
if you make changes to your ownGXREG
object and you wish them to take effect in the workspaceGXREG
.
-
classmethod
get_yes_no
(group, field)¶ Check a YES/NO Setting
Parameters: - group (str) – Group Name
- field (str) – Parameter Name
Returns: 1 - if first char in setting is a “Y” or”y” 0 - Otherwise
Return type: int
New in version 5.0.
License: Geosoft Open License
-
classmethod
global_
(parm, setting)¶ Get a global parameter setting.
Parameters: - parm (str) – Name of the Parameter
- setting (str_ref) – Setting returned
Returns: 0 if parameter found. 1 if parameter not found or not set.
Return type: int
New in version 6.0.1.
License: Geosoft Open License
Note: The returned string will be empty if the parameter is not found.
Parameters are derived from GEOSOFT.INI. This is a standard Windows style INI file that contains [GROUPS], PARAMETERS and SETTINGS as follows
[GROUP1] PARAM1=setting1 PARAM2 setting2 PARAM3 “setting3 is text”
To retrieve an entry, specify the group.parameter. For example, iGlobal_SYS(“GROUP1.PARAM3”,sSetting) will retrieve the string “setting is text”. The double quotes will not appear in the setting.
-
classmethod
global_reset
(ini)¶ Reset the global parameters.
Parameters: ini (str) – New INI file name, if “”, use default. New in version 5.0.
License: Geosoft Open License
-
classmethod
global_set
(parm, set)¶ Set a global parameter setting.
Parameters: - parm (str) – Name of the Parameter
- set (str) – Setting
New in version 5.0.
License: Geosoft Open License
-
classmethod
global_write
(ini)¶ Modify the global parameters.
Parameters: ini (str) – Global INI file, if “” use default. New in version 5.0.
License: Geosoft Open License
Note: If the global parameters have been changed, use this function to make the changes permanent,
-
classmethod
gt_string
(group, field, buff)¶ This method returns a string in the parameter block.
Parameters: - group (str) – Group Name
- field (str) – Parameter Name
- buff (str_ref) – Buffer to place the string into
New in version 5.0.
License: Geosoft Open License
Note: If the setting exits it is placed in the buffer, otherwise the buffer will have zero length
-
classmethod
interactive
()¶ Checks to see if you should run interactively.
Returns: 0 - Run in batch mode only 1 - Run Interactively only Return type: int New in version 5.0.
License: Geosoft Open License
-
classmethod
is_encrypted_string
(input)¶ Checks whether the specified string was encrypted by
encrypt_string
.Parameters: input (str) – Input string to inspect. Returns: 0 (false) or non-zero (true) Return type: int New in version 9.0.
License: Geosoft Open License
-
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_parm
(file, groups)¶ Reads parameters from a file.
Parameters: - file (str) – Name of the File to read from
- groups (str) – Group Name to write read (“” for all groups)
New in version 5.0.
License: Geosoft Open License
-
classmethod
log_script_run
(location)¶ This method logs that a script was run
Parameters: location (str) – Location that launched the script New in version 9.2.
License: Geosoft Open License
-
classmethod
longto_date
(days)¶ Converts a value representing total days elapsed since day 0 of year 0 to a geosoft date. This uses the Numerical Receipies Julian function.
Parameters: days (int) – Day Returns: x - Date Return type: float New in version 6.3.
License: Geosoft Open License
-
classmethod
longto_time
(sec)¶ Converts seconds to decimal hours.
Parameters: sec (int) – Seconds Returns: x - Time Return type: float New in version 6.3.
License: Geosoft Open License
-
classmethod
make_date
(year, month, day)¶ Returns the decimal date given the year, month and day.
Parameters: - year (int) – Year
- month (int) – Month (0-11)
- day (int) – Day (0-30)
Returns: Date in decimal years.
Return type: float
New in version 5.1.1.
License: Geosoft Open License
-
classmethod
make_dir
(dir)¶ Create a directory.
Parameters: dir (str) – Name of directory Returns: 0 - Directory made 1 - Directory cannot be made Return type: int New in version 5.0.
License: Geosoft Open License
-
classmethod
make_file_readonly
(file)¶ Set a file’s read-only attribute.
Parameters: file (str) – Name of file Returns: 0 if read-only attribute successfully set, 1 if attribute change fails. Return type: int New in version 6.3.
License: Geosoft Open License
-
classmethod
make_file_writable
(file)¶ Removes a file’s read-only attribute.
Parameters: file (str) – Name of file Returns: 0 if read-only attribute successfully removed, 1 if attribute change fails. Return type: int New in version 6.3.
License: Geosoft Open License
-
classmethod
num_errors_ap
()¶ Returns the number of registered errors.
Returns: The number of registered errors. Return type: int New in version 6.0.
License: Geosoft Open License
Note: This wrapper is mostly for use outside of GXs, because in general if an error is registered in a GX the GX would terminate before it could be called.
See also
GetErrorMessageAP_SYS
-
classmethod
ole_automation
(object, info_str, info_val)¶ Call OLE Automation designed to be called from Montaj.
Parameters: - object (str) – Object Name
- info_str (str) – Info String
- info_val (int) – Info Int
Returns: Return from automation engine.
Return type: int
New in version 5.0.
License: Geosoft Open License
Limitations: May not be available while executing a command line program.
-
classmethod
prog_name
(name, reset)¶ This method allows you to name the current process being displayed by the progress bar. This method has no affect if no progress bar exists.
Parameters: - name (str) – New Process Name
- reset (int) – 0 - Change the Name but do not change the percentage 1 - Change the Name and Reset Percent to 0 2 - Change the Name but no Percent Bar
New in version 5.0.
License: Geosoft Open License
-
classmethod
prog_state
()¶ Return current progress state (On/Off)
Return type: int New in version 7.2.
License: Geosoft Open License
Note: This is useful, for instance, when calling one GX from another, especially if it is called multiple times in a loop. The called GX may turn the progress ON/OFF on its own, which means any progress tracking in the calling GX is disrupted. The called GX should use this function to determine the original progress state, and not turn off progress if it was already on.
Returns 0 - Progress is on - Progress is off
-
classmethod
prog_update
(perc)¶ This method drives the Progress Bar. It is passed a percentage and will update the bar to reflect that percentage.
Parameters: perc (int) – Percentage Completed (0-100). New in version 5.0.
License: Geosoft Open License
-
classmethod
prog_update_l
(v1, v2)¶ Updates progress bar based on count and maxcount.
Parameters: - v1 (int) – Count
- v2 (int) – Max count >= count
New in version 5.0.
License: Geosoft Open License
-
classmethod
progress
(on)¶ This method allows you to turn on the Progress BAR ON/OFF. Once the progress bar is on, use the UpdateProg method to drive it.
Parameters: on (int) – 0 - Turn Progress Bar OFF 1 - Turn Progress Bar ON New in version 5.0.
License: Geosoft Open License
-
classmethod
prompt
(title, result)¶ Asks the User to enter a string.
Parameters: - title (str) – Title of the window
- result (str_ref) – Buffer to place the user’s string
Returns: 0 - User hit OK 1 - user hit CANCEL
Return type: int
New in version 5.0.
License: Geosoft Open License
Limitations: May not be available while executing a command line program.
Note: The User string is displayed as the default value in the prompt. Empty the user string if no default is needed.
-
classmethod
registry_delete_key
(domain, key)¶ Delete a registry value
Parameters: - domain (int) – REG_DOMAIN constants
- key (str) – Key to delete
Returns: 0 - Ok 1 - Error
Return type: int
New in version 5.0.
License: Geosoft Open License
Note: All sub-keys and values will be deleted if they exist.
-
classmethod
registry_delete_val
(domain, key, value_name)¶ Delete a registry value
Parameters: - domain (int) – REG_DOMAIN constants
- key (str) – Key
- value_name (str) – Name of value to delete
Returns: 0 - Ok 1 - Error
Return type: int
New in version 5.0.
License: Geosoft Open License
-
classmethod
registry_get_val
(domain, key, sub_key, value)¶ Get a registry value
Parameters: - domain (int) – REG_DOMAIN constants
- key (str) – Key to set
- sub_key (str) – Value name within key
- value (str_ref) – String for value data
Returns: 0 if value exists 1 if value does not exist
Return type: int
New in version 6.0.1.
License: Geosoft Open License
-
classmethod
registry_set_val
(domain, key, sub_key, value)¶ Set/create a registry value
Parameters: - domain (int) – REG_DOMAIN constants
- key (str) – Key to set
- sub_key (str) – Name of Subkey within key
- value (str) – Value for Subkey
New in version 5.0.
License: Geosoft Open License
Note: This function will create the subkey and key if either do not already exist.
-
classmethod
relative_file_name
(abbr, name)¶ Convert a file name to a relative abbreviated path name
Parameters: - abbr (str) – Input file name to resolve
- name (str_ref) – Output name, can be the same as input
New in version 6.0.1.
License: Geosoft Open License
Note: This will produce relative paths based on the workspace directory into ”.name”.
-
classmethod
remove_lineage_output
(output_name)¶ Remove an output from the current lineage object
Parameters: output_name (str) – Source Name New in version 7.0.1.
License: Geosoft Open License
-
classmethod
remove_lineage_parameter
(name)¶ Remove a parameter in the current lineage object
Parameters: name (str) – Paramter Name New in version 7.0.
License: Geosoft Open License
-
classmethod
remove_lineage_source
(source_name)¶ Remove a source from the current lineage object
Parameters: source_name (str) – Source Name New in version 7.0.
License: Geosoft Open License
-
classmethod
replace_string
(str_val, output, group)¶ Replace “% %” tokens in a string with parameter values
Parameters: - str_val (str) – String to filter replace
- output (str_ref) – Output string
- group (str) – Default group name
New in version 5.0.
License: Geosoft Open License
Note: If parameter does not exist, the token is removed. Full parameter names, such as “%group.name%”, are used as-is. Partial parameter names, such as “%name%” will have the default group attached.
-
classmethod
reset_settings
()¶ Resets the GX_HELP settings in the geosoft.ini file after changes have been made.
New in version 5.1.8.
License: Geosoft Open License
Limitations: May not be available while executing a command line program.
-
classmethod
restore_geo_file
(target, original)¶ Backup a Geosoft data file and all associated files to original location
Parameters: - target (str) – Backup File Name
- original (str) – Original file name
New in version 7.0.
License: Geosoft End-User License
Note: Grids are copied and the GI’s are maintained - note that support for non-geosoft grids is limited since this method does not guarantee all grid files besides the main one are copied.
-
classmethod
run
(command, args, process)¶ Run a command line process.
Parameters: - command (str) – Command name
- args (str) – Command line arguments
- process (int) – Flags SYS_RUN_TYPE constants SYS_RUN_DISPLAY constants SYS_RUN_HOLD constants SYS_RUN_WIN constants
Returns: -1 if failed to execute task Exit status of the task
Return type: int
New in version 5.0.
License: Geosoft Open License
Note: The Default option for each define below is the first one and is set to 0.
We look for the command object in the following order:
- the local working directory
- the <geosoft>bin directory
- the system path
-
classmethod
run_gs
(gs)¶ Run a GS.
Parameters: gs (str) – Name of GS to run. Returns: Exit status of the GS -1 cancelled 0 success 1 ended with an error. Return type: int New in version 5.0.
License: Geosoft Open License
See also
-
classmethod
run_gx
(gx)¶ Run a GX.
Parameters: gx (str) – Name of GX to run. Returns: Exit status of the GX: -1 cancelled 0 success 1 ended with an error. Return type: int New in version 5.0.
License: Geosoft Open License
Note: If the called GX returns an error, they will not be displayed until the “top” calling GX terminates, unless you call
show_error
.See also
-
classmethod
run_gx_ex
(gx, ret)¶ Run a GX.
Parameters: - gx (str) – Name of GX to run.
- ret (int_ref) – Return value set in the child GX (0 by default)
Returns: Exit status of the GX: -1 cancelled 0 success 1 ended with an error.
Return type: int
New in version 5.0.
License: Geosoft Open License
See also
-
classmethod
run_multi_user_script
(script, users, iterations, wait_min_time, wait_max_time, ramp_up_time)¶ Execute a script using multithreaded users
Parameters: - script (str) – Script to run
- users (int) – Number of users to run
- iterations (int) – Number of iterations to run (for each user)
- wait_min_time (int) – Minimum wait time between iterations (0 for none)
- wait_max_time (int) – Maximum wait time between iterations (0 for none)
- ramp_up_time (int) – Ramp up time for users (0 for all users start immediatly)
New in version 5.1.6.
License: Geosoft Open License
Note: No access is provided in the script to EMAPS or EDBS. Users must ensure that the resources that are shared are protected.
-
classmethod
run_pdf
(mnu, pdf)¶ Run a PDF.
Parameters: - mnu (str) – Group name, can be “”.
- pdf (str) – PDF name (.pdf assumed)
Returns: Exit status of the task, 0 usually means success.
Return type: int
New in version 5.0.
License: Geosoft End-User License
Limitations: May not be available while executing a command line program.
Note: The group name of the PDF variables will be “group_pdf”, where “group” is the name given in the first argument, and “pdf” is the root PDF file name.
-
classmethod
save_log
(file)¶ Saves the main log file to another file.
Parameters: file (str) – Output file name New in version 5.0.
License: Geosoft Open License
Limitations: May not be available while executing a command line program.
-
classmethod
save_parm
(file, mode, groups)¶ Writes out one group (or all groups) to a file.
Parameters: - file (str) – Name of the File
- mode (int) – 0 - New file, 1 - Append
- groups (str) – Group Name to write out (“” for all groups)
New in version 5.0.
License: Geosoft Open License
-
classmethod
save_ptmp
(groups)¶ Save a temporary copy of the parameter block.
Parameters: groups (str) – Group Name to save, “” for everything. Returns: PTMP handle. Return type: int New in version 5.0.
License: Geosoft Open License
Note: All PTMP instances will be destroyed on exit.
See also
-
classmethod
script
()¶ Checks to see if we are running inside OMS (script mode)
Returns: 0 - Normal mode 1 - Scripting mode A number of functions can only be run from inside Oasis montaj (such as
GXEMAP.get_display_area_raw
), because they require an actual window object, such as an editable database or map. Use this function to prevent callsReturn type: int New in version 6.0.1.
License: Geosoft Open License
-
classmethod
script_record
()¶ Checks to see if we are in scripting recording mode
Returns: 0 - Normal mode 1 - Recording mode Return type: int New in version 6.3.
License: Geosoft Open License
-
classmethod
secondsto_time
(sec)¶ Converts fractional seconds to decimal hours.
Parameters: sec (float) – Seconds Returns: x - Time Return type: float New in version 6.3.
License: Geosoft Open License
-
classmethod
send_general_message
(cl, info)¶ Send a general information message to all listners
Parameters: - cl (str) – Message Class
- info (str) – Message Info
New in version 6.3.
License: Geosoft Open License
-
classmethod
set_cursor
(cursor)¶ Set the cursor on the display.
Parameters: cursor (str) – Cursor Names New in version 5.0.
License: Geosoft Open License
Limitations: May not be available while executing a command line program.
Note: Possible Cursors: Normal, Horiz, Vert, Moving, Cross, Hand, NoEdit, Sun, View, Group, ViewSel, GroupSel, BoxSelect, Shadow, Link, Line, PolyLine, Polygon, Ellipse, Rectangle, Text, Symbol, Zoom, Pan, Rotate, InteractiveZoom, PolyFill, GetFill, SnapPoint, SnapLine, SnapOnPoint, SnapOnLine, NPolygon, ExcludeRect, ExcludePoly, ExcludeNPoly, AddVertex, DelVertex, GeneralAdd and GeneralDelete
-
classmethod
set_double
(group, field, val)¶ This method Sets a real in the parameter block.
Parameters: - group (str) – Group Name
- field (str) – Parameter Name
- val (float) – Real
New in version 5.0.
License: Geosoft Open License
-
classmethod
set_env
(parm, set)¶ Set an environment setting.
Parameters: - parm (str) – Setting
- set (str) – Value
New in version 5.0.
License: Geosoft Open License
-
classmethod
set_info_line
(message)¶ Display a message on the information line at the left bottom corner of the OAISIS montaj application.
Parameters: message (str) – Message String New in version 5.0.
License: Geosoft Open License
Limitations: May not be available while executing a command line program.
-
classmethod
set_int
(group, field, val)¶ This method sets an int in the parameter block.
Parameters: - group (str) – Group Name
- field (str) – Parameter Name
- val (int) – Int Value to Set
New in version 5.0.
License: Geosoft Open License
-
classmethod
set_interactive
(mode)¶ Sets the interactive mode.
Parameters: mode (int) – 0 - interactive off 1 - interative on New in version 5.0.
License: Geosoft Open License
Note: Call to
interactive
will return the value set here.See also
interactive
,run_gx
andrun_gs
-
classmethod
set_lineage_description
(description)¶ Set the description for the current lineage object
Parameters: description (str) – Description New in version 7.0.
License: Geosoft Open License
-
classmethod
set_lineage_display_name
(display_name)¶ Set the display name for the current lineage object
Parameters: display_name (str) – DisplayName New in version 7.0.
License: Geosoft Open License
-
classmethod
set_lineage_name
(name)¶ Set the name for the current lineage object
Parameters: name (str) – Name New in version 7.0.
License: Geosoft Open License
Load a list of menus
Parameters: - lst_default (GXLST) – Default menus (typically a single entry based on product, do not change the name returned by
get_loaded_menus
) - lst_loaded (GXLST) – Loaded menus
- lst_user (GXLST) – Loaded user menus
New in version 9.0.
License: Geosoft Open License
Limitations: May not be available while executing a command line program.
Note: The names of the LSTs contain the menus and the values contain any exclusions. Exclusions are semicolon separated top level menu names and/or toolbar.geobar file names.
- lst_default (GXLST) – Default menus (typically a single entry based on product, do not change the name returned by
-
classmethod
set_pattern
(group, pat, size, thick, dense, col, back_col)¶ Sets pattern parameters in the parameter block.
Parameters: - group (str) – Group Name
- pat (int) – Pattern
- size (float) – Size. Input
GS_R8DM
to use default - thick (int) – Thickness (0-100). Input
GS_S4DM
to use default - dense (float) – Density. Input
GS_R8DM
to use default - col (int) – Pattern Color
- back_col (int) – Background Color. Can be
C_TRANSPARENT
New in version 6.4.
License: Geosoft Open License
Note: Sets all the user-definable pattern parameters to a specified group. Parameters are: “PAT_NUMBER” 0 is solid fill “PAT_SIZE” pattern tile size in mm. “PAT_THICKNESS” pattern line thickness in percent of the tile size. valid range is 0-100. “PAT_DENSITY” Tile spacing. A value of 1 means tiles are laid with no overlap. A value of 2 means they overlap each other. “PAT_COLOR” The color value. “PAT_BACKCOLOR” Background color value.
Input values may be DUMMY.
Designed for use along with the sPatternForm_GUI function.
-
classmethod
set_reg
(reg)¶ Copy contents of a
GXREG
to current parameters.Parameters: reg (GXREG) – GXREG
objectNew in version 5.0.
License: Geosoft Open License
-
classmethod
set_return
(ret)¶ Set the return value of a GX.
Parameters: ret (int) – Return Value New in version 5.0.
License: Geosoft Open License
Note: This value is returned in the
run_gx_ex
call only.
-
classmethod
set_server_messages_ap
(flag)¶ Control the server message handling.
Parameters: flag (int) – 1 - Display messages, 0 - messages reported as errors New in version 6.2.
License: Geosoft Open License
Note: Should be set to false when dialogs should not appear. This setting is thread specific.
-
classmethod
set_settings_meta
(meta)¶ Set the settings metadata object.
Parameters: meta (GXMETA) – GXMETA
objectNew in version 6.0.
License: Geosoft Open License
-
classmethod
set_string
(group, field, val)¶ This method sets a string in the parameter block.
Parameters: - group (str) – Group Name
- field (str) – Parameter Name
- val (str) – String to Set it To
New in version 5.0.
License: Geosoft Open License
-
classmethod
set_workspace_reg
(reg)¶ Set the workspace
GXREG
;Parameters: reg (GXREG) – GXREG
objectNew in version 5.0.
License: Geosoft Open License
Note: The workspace
GXREG
is separate from the reg used to storeGXSYS
parameters.Because
get_workspace_reg
returns a copy of the workspaceGXREG
, and not the workspaceGXREG
itself, you must callset_workspace_reg
if you make changes to your ownGXREG
object and you wish them to take effect in the workspaceGXREG
-
classmethod
shell_execute
(verb, file, parameters, directory, show)¶ Call Microsoft ShellExecute function (See MSDN)
Parameters: - verb (str) – Verb
- file (str) – File
- parameters (str) – Parameters
- directory (str) – Directory
- show (int) – SHELL_EXECUTE constants
Returns: return value of ShellExecute as documented on MSDN
Return type: int
New in version 5.0.
License: Geosoft Open License
See also
-
classmethod
short_path_file_name
(in_name, name)¶ Obtains the short path form of a specified input path.
Parameters: - in_name (str) – Input file name to resolve
- name (str_ref) – Output name, can be the same as input
New in version 5.0.
License: Geosoft Open License
-
classmethod
temp_file_ext
(ext, out)¶ Generate a unique file name for this extension in the temp directory.
Parameters: - ext (str) – Input extension (without .)
- out (str_ref) – Output name
New in version 5.1.8.
License: Geosoft Open License
Note: This is useful for created a unique tempory name for a file in the Geosoft temporary directory.
-
classmethod
temp_file_name
(path_file, out_filename)¶ Generate a file name for this file in the temp directory.
Parameters: - path_file (str) – Input file name to resolve (path is removed)
- out_filename (str_ref) – Output name, can be the same as input
New in version 5.0.
License: Geosoft Open License
Note: This is useful for created a unique tempory name for a file in the Geosoft temporary directory.
From version 7.0 The file extension will match the input file, but the filename itself will be a process and thread unique value to ensure that clashes does not happen.
-
classmethod
terminate
(name)¶ DLL error termination
Parameters: name (str) – Module name New in version 5.0.
License: Geosoft Open License
Note: Call this function immediately before returning to the caller after an error has occurred inside the DLL. If an error has occurred, you should clean-up (free memory, close files), call
error
to register your own error messages, callerror_tag
to set any error message tags, callterminate
and return.Geosoft functions that detect an error will have already registered their own errors and called
terminate
.
-
classmethod
time
()¶ Returns the current time in decimal hours.
Returns: Time in decimal hours. Return type: float New in version 5.0.
License: Geosoft Open License
Note: The FormatTime_STR function can be used to convert a time to a string.
-
classmethod
timeto_long
(time)¶ Converts decimal hours to seconds in a day.
Parameters: time (float) – Time Returns: x - Seconds (integer) Return type: int New in version 6.3.
License: Geosoft Open License
-
classmethod
timeto_seconds
(time)¶ Converts decimal hours to seconds in a day fractional
Parameters: time (float) – Time Returns: x - Number of seconds with fractions Return type: float New in version 6.3.
License: Geosoft Open License
-
classmethod
transfer_path
(path_file, file)¶ Transfers file path to new file name.
Parameters: - path_file (str) – Input file path/name
- file (str_ref) – Output file name with path transfered
New in version 5.1.8.
License: Geosoft Open License
Note: The path and volume of from the input string is added to file name from the output string.
-
classmethod
utc_date
()¶ Returns the current UTC date in decimal years.
Returns: Date in decimal years. Return type: float New in version 7.0.
License: Geosoft Open License
Note: The FormatDate_STR function can be used to convert a date to a string.
-
classmethod
utc_file_date
(file)¶ File creation UTC date in decimal years.
Parameters: file (str) – File name Returns: Date in decimal years, rDUMMY
if the file does not exist.Return type: float New in version 7.0.
License: Geosoft Open License
Note: The FormatDate_STR function can be used to convert a date to a string.
-
classmethod
utc_file_time
(file)¶ File creation UTC time in decimal hours.
Parameters: file (str) – File name Returns: Date in decimal hours, rDUMMY
if the file does not exist.Return type: float New in version 7.0.
License: Geosoft Open License
Note: The FormatTime_STR function can be used to convert a time to a string.
-
classmethod
utc_time
()¶ Returns the current UTC time in decimal hours.
Returns: Time in decimal hours. Return type: float New in version 7.0.
License: Geosoft Open License
Note: The FormatTime_STR function can be used to convert a time to a string.
-
classmethod
valid_file_name
(file)¶ Check to see if a file name valid
Parameters: file (str) – Name of file to check Returns: 0 - File name is not valid 1 - File name is valid Return type: int New in version 5.0.
License: Geosoft Open License
Note: Use the FULL path for the file name. If the full path is not specified, then the current working directory is used for the path.
-
classmethod
write_debug_log
(log)¶ This method writes out information to the output debugging log file (in temp folder) or output window.
Parameters: log (str) – String to Write out New in version 6.3.
License: Geosoft Open License
-
classmethod
write_in_dir
(dir)¶ Can I create files in this directory ?
Parameters: dir (str) – Name of directory to check Returns: 0 - Directory doesn’t allow write of does not exist 1 - Directory allows writes Return type: int New in version 5.0.
License: Geosoft Open License
-
classmethod
ARC_LICENSE constants¶
ArcGIS platform types
-
ARC_LICENSE_ENGINENOTPRESENT
¶ The Engine or any qualifying ArcGIS product is missing
-
gxapi.
ARC_LICENSE_ENGINENOTPRESENT
= 0
-
-
ARC_LICENSE_DESKTOPENGINE
¶ Desktop Engine
-
gxapi.
ARC_LICENSE_DESKTOPENGINE
= 1
-
-
ARC_LICENSE_ARCVIEW
¶ ArcView
-
gxapi.
ARC_LICENSE_ARCVIEW
= 2
-
-
ARC_LICENSE_ARCEDITOR
¶ ArcEditor
-
gxapi.
ARC_LICENSE_ARCEDITOR
= 3
-
-
ARC_LICENSE_ARCINFO
¶ ArcInfo
-
gxapi.
ARC_LICENSE_ARCINFO
= 4
-
-
ARC_LICENSE_ARCSERVER
¶ ArcServer
-
gxapi.
ARC_LICENSE_ARCSERVER
= 5
-
GEO_DIRECTORY constants¶
Geosoft directory defines
-
GEO_DIRECTORY_NONE
¶ None
-
gxapi.
GEO_DIRECTORY_NONE
= 0
-
-
GEO_DIRECTORY_GEOSOFT
¶ Geosoft\
-
gxapi.
GEO_DIRECTORY_GEOSOFT
= 1
-
-
GEO_DIRECTORY_BIN
¶ Geosoft\bin
-
gxapi.
GEO_DIRECTORY_BIN
= 2
-
-
GEO_DIRECTORY_GER
¶ Geosoft\ger
-
gxapi.
GEO_DIRECTORY_GER
= 3
-
-
GEO_DIRECTORY_OMN
¶ Geosoft\omn
-
gxapi.
GEO_DIRECTORY_OMN
= 4
-
-
GEO_DIRECTORY_TBL
¶ Geosoft\tbl
-
gxapi.
GEO_DIRECTORY_TBL
= 5
-
-
GEO_DIRECTORY_FONTS
¶ Geosoft\fonts
-
gxapi.
GEO_DIRECTORY_FONTS
= 6
-
-
GEO_DIRECTORY_GX
¶ Geosoft\gx
-
gxapi.
GEO_DIRECTORY_GX
= 7
-
-
GEO_DIRECTORY_GS
¶ Geosoft\gs
-
gxapi.
GEO_DIRECTORY_GS
= 8
-
-
GEO_DIRECTORY_APPS
¶ Geosoft\apps
-
gxapi.
GEO_DIRECTORY_APPS
= 9
-
-
GEO_DIRECTORY_ETC
¶ Geosoft\user\etc and then Geosoft\etc
-
gxapi.
GEO_DIRECTORY_ETC
= 10
-
-
GEO_DIRECTORY_HLP
¶ Geosoft\hlp
-
gxapi.
GEO_DIRECTORY_HLP
= 11
-
-
GEO_DIRECTORY_USER_CSV
¶ Geosoft\user\csv
-
gxapi.
GEO_DIRECTORY_USER_CSV
= 14
-
-
GEO_DIRECTORY_USER_LIC
¶ Geosoft\user\lic
-
gxapi.
GEO_DIRECTORY_USER_LIC
= 15
-
-
GEO_DIRECTORY_USER_INI
¶ Geosoft\user\ini
-
gxapi.
GEO_DIRECTORY_USER_INI
= 16
-
-
GEO_DIRECTORY_USER_TEMP
¶ Geosoft\temp (or where the user put it)
-
gxapi.
GEO_DIRECTORY_USER_TEMP
= 17
-
-
GEO_DIRECTORY_USER_ETC
¶ Geosoft\user\etc
-
gxapi.
GEO_DIRECTORY_USER_ETC
= 18
-
-
GEO_DIRECTORY_IMG
¶ Geosoft\img
-
gxapi.
GEO_DIRECTORY_IMG
= 19
-
-
GEO_DIRECTORY_BAR
¶ Geosoft\bar
-
gxapi.
GEO_DIRECTORY_BAR
= 20
-
-
GEO_DIRECTORY_MAPTEMPLATE
¶ Geosoft\maptemplate
-
gxapi.
GEO_DIRECTORY_MAPTEMPLATE
= 22
-
-
GEO_DIRECTORY_USER_MAPTEMPLATE
¶ Geosoft\user\maptemplate
-
gxapi.
GEO_DIRECTORY_USER_MAPTEMPLATE
= 23
-
-
GEO_DIRECTORY_PYGX
¶ Geosoft\pygx
-
gxapi.
GEO_DIRECTORY_PYGX
= 24
-
-
GEO_DIRECTORY_USER_PYGX
¶ Geosoft\user\pygx
-
gxapi.
GEO_DIRECTORY_USER_PYGX
= 25
-
-
GEO_DIRECTORY_USER_GX
¶ Geosoft\user\gx
-
gxapi.
GEO_DIRECTORY_USER_GX
= 26
-
REG_DOMAIN constants¶
Registry key domains
-
REG_DOMAIN_MACHINE
¶ Same as HKEY_LOCAL_MACHINE in Windows
-
gxapi.
REG_DOMAIN_MACHINE
= 0
-
-
REG_DOMAIN_USER
¶ Same as HKEY_CURRENT_USER in Windows
-
gxapi.
REG_DOMAIN_USER
= 1
-
SHELL_EXECUTE constants¶
Shell execute defines
-
SW_HIDE
¶ Sw hide
-
gxapi.
SW_HIDE
= 0
-
-
SW_SHOWNORMAL
¶ Sw shownormal
-
gxapi.
SW_SHOWNORMAL
= 1
-
-
SW_SHOWMINIMIZED
¶ Sw showminimized
-
gxapi.
SW_SHOWMINIMIZED
= 2
-
-
SW_SHOWMAXIMIZED
¶ Sw showmaximized
-
gxapi.
SW_SHOWMAXIMIZED
= 3
-
-
SW_SHOWNOACTIVATE
¶ Sw shownoactivate
-
gxapi.
SW_SHOWNOACTIVATE
= 4
-
-
SW_SHOW
¶ Sw show
-
gxapi.
SW_SHOW
= 5
-
-
SW_MINIMIZE
¶ Sw minimize
-
gxapi.
SW_MINIMIZE
= 6
-
-
SW_SHOWMINNOACTIVE
¶ Sw showminnoactive
-
gxapi.
SW_SHOWMINNOACTIVE
= 7
-
-
SW_SHOWNA
¶ Sw showna
-
gxapi.
SW_SHOWNA
= 8
-
-
SW_RESTORE
¶ Sw restore
-
gxapi.
SW_RESTORE
= 9
-
-
SW_SHOWDEFAULT
¶ Sw showdefault
-
gxapi.
SW_SHOWDEFAULT
= 10
-
-
SW_FORCEMINIMIZE
¶ Sw forceminimize
-
gxapi.
SW_FORCEMINIMIZE
= 11
-
SYS_DIR constants¶
GXSYS
Directory locations
-
SYS_DIR_LOCAL
¶ Is the workspace working directory
-
gxapi.
SYS_DIR_LOCAL
= 0
-
-
SYS_DIR_GEOSOFT
¶ Is the geosoft installation directory (read-only)
-
gxapi.
SYS_DIR_GEOSOFT
= 1
-
-
SYS_DIR_USER
¶ is the geosoft installation directory that contains user read/write files.
-
gxapi.
SYS_DIR_USER
= 2
-
-
SYS_DIR_GEOTEMP
¶ Geosoft Temp folder
-
gxapi.
SYS_DIR_GEOTEMP
= 3
-
-
SYS_DIR_WINDOWS
¶ Windows folder
-
gxapi.
SYS_DIR_WINDOWS
= 4
-
-
SYS_DIR_SYSTEM
¶ Windows SYSTEM folder
-
gxapi.
SYS_DIR_SYSTEM
= 5
-
-
SYS_DIR_LICENSE
¶ Where the license file is stored
-
gxapi.
SYS_DIR_LICENSE
= 6
-
-
SYS_DIR_RESOURCEFILES
¶ User RESOURCEFILES Folder
-
gxapi.
SYS_DIR_RESOURCEFILES
= 7
-
-
SYS_DIR_GEOSOFT_BAR
¶ BAR folder
-
gxapi.
SYS_DIR_GEOSOFT_BAR
= 100
-
-
SYS_DIR_GEOSOFT_BIN
¶ BIN folder
-
gxapi.
SYS_DIR_GEOSOFT_BIN
= 101
-
-
SYS_DIR_GEOSOFT_CSV
¶ CSV folder
-
gxapi.
SYS_DIR_GEOSOFT_CSV
= 102
-
-
SYS_DIR_GEOSOFT_CSV_ALIASES
¶ CSV ALIASES folder
-
gxapi.
SYS_DIR_GEOSOFT_CSV_ALIASES
= 103
-
-
SYS_DIR_GEOSOFT_DATA
¶ DATA folder
-
gxapi.
SYS_DIR_GEOSOFT_DATA
= 104
-
-
SYS_DIR_GEOSOFT_DBG
¶ DBG folder
-
gxapi.
SYS_DIR_GEOSOFT_DBG
= 105
-
-
SYS_DIR_GEOSOFT_ENCRYPTEDFILES
¶ Encrypted Files folder
-
gxapi.
SYS_DIR_GEOSOFT_ENCRYPTEDFILES
= 106
-
-
SYS_DIR_GEOSOFT_ETC
¶ ETC folder
-
gxapi.
SYS_DIR_GEOSOFT_ETC
= 107
-
-
SYS_DIR_GEOSOFT_FONTS
¶ FONTS folder
-
gxapi.
SYS_DIR_GEOSOFT_FONTS
= 108
-
-
SYS_DIR_GEOSOFT_GS
¶ GS folder
-
gxapi.
SYS_DIR_GEOSOFT_GS
= 110
-
-
SYS_DIR_GEOSOFT_GX
¶ GX folder
-
gxapi.
SYS_DIR_GEOSOFT_GX
= 111
-
-
SYS_DIR_GEOSOFT_HLP
¶ HLP folder
-
gxapi.
SYS_DIR_GEOSOFT_HLP
= 112
-
-
SYS_DIR_GEOSOFT_INI
¶ INI folder
-
gxapi.
SYS_DIR_GEOSOFT_INI
= 114
-
-
SYS_DIR_GEOSOFT_MAPTEMPLATE
¶ GXMAPTEMPLATE
folder-
gxapi.
SYS_DIR_GEOSOFT_MAPTEMPLATE
= 115
-
-
SYS_DIR_GEOSOFT_OMN
¶ OMN folder
-
gxapi.
SYS_DIR_GEOSOFT_OMN
= 116
-
-
SYS_DIR_GEOSOFT_PAGE
¶ PAGE folder
-
gxapi.
SYS_DIR_GEOSOFT_PAGE
= 117
-
-
SYS_DIR_GEOSOFT_SCHEMA
¶ SCHEMA folder
-
gxapi.
SYS_DIR_GEOSOFT_SCHEMA
= 118
-
-
SYS_DIR_GEOSOFT_SPEC_INI
¶ SPEC INI older
-
gxapi.
SYS_DIR_GEOSOFT_SPEC_INI
= 119
-
-
SYS_DIR_GEOSOFT_STYLESHEETS
¶ STYLE SHEETS folder
-
gxapi.
SYS_DIR_GEOSOFT_STYLESHEETS
= 120
-
-
SYS_DIR_GEOSOFT_TBL
¶ TBL folder
-
gxapi.
SYS_DIR_GEOSOFT_TBL
= 121
-
-
SYS_DIR_USER_CSV
¶ User CSV Folder
-
gxapi.
SYS_DIR_USER_CSV
= 200
-
-
SYS_DIR_USER_ETC
¶ User ETC Folder
-
gxapi.
SYS_DIR_USER_ETC
= 201
-
-
SYS_DIR_USER_GS
¶ User GS Folder
-
gxapi.
SYS_DIR_USER_GS
= 202
-
-
SYS_DIR_USER_HLP
¶ User HLP Folder
-
gxapi.
SYS_DIR_USER_HLP
= 203
-
-
SYS_DIR_USER_INI
¶ User INI Folder
-
gxapi.
SYS_DIR_USER_INI
= 204
-
-
SYS_DIR_USER_LIC
¶ User LIC Folder
-
gxapi.
SYS_DIR_USER_LIC
= 205
-
-
SYS_DIR_USER_MAPTEMPLATE
¶ User
GXMAPTEMPLATE
Folder-
gxapi.
SYS_DIR_USER_MAPTEMPLATE
= 206
-
-
SYS_DIR_USER_OMN
¶ User OMN Folder
-
gxapi.
SYS_DIR_USER_OMN
= 207
-
-
SYS_DIR_USER_BAR
¶ User BAR Folder
-
gxapi.
SYS_DIR_USER_BAR
= 214
-
-
SYS_DIR_USER_STACKS
¶ User STACKS Folder
-
gxapi.
SYS_DIR_USER_STACKS
= 209
-
-
SYS_DIR_USER_TEMP
¶ User TEMP Folder
-
gxapi.
SYS_DIR_USER_TEMP
= 210
-
-
SYS_DIR_USER_SERVICES
¶ User SERVICES Folder
-
gxapi.
SYS_DIR_USER_SERVICES
= 211
-
-
SYS_DIR_USER_STYLESHEETS
¶ User STYLESHEETS Folder
-
gxapi.
SYS_DIR_USER_STYLESHEETS
= 212
-
SYS_FONT constants¶
Font types
-
SYS_FONT_GFN
¶ Geosoft GFN fonts.
-
gxapi.
SYS_FONT_GFN
= 1
-
-
SYS_FONT_TT
¶ Available TrueType fonts
-
gxapi.
SYS_FONT_TT
= 0
-
SYS_INFO constants¶
System information
-
SYS_INFO_VERSION_MAJOR
¶ Version major
-
gxapi.
SYS_INFO_VERSION_MAJOR
= 0
-
-
SYS_INFO_VERSION_MINOR
¶ Version minor
-
gxapi.
SYS_INFO_VERSION_MINOR
= 1
-
-
SYS_INFO_VERSION_SP
¶ Version sp
-
gxapi.
SYS_INFO_VERSION_SP
= 2
-
-
SYS_INFO_BUILD_NUMBER
¶ Build number
-
gxapi.
SYS_INFO_BUILD_NUMBER
= 3
-
-
SYS_INFO_BUILD_LABEL
¶ Build label
-
gxapi.
SYS_INFO_BUILD_LABEL
= 4
-
-
SYS_INFO_VERSION_LABEL
¶ Version label
-
gxapi.
SYS_INFO_VERSION_LABEL
= 5
-
-
SYS_INFO_PRODUCTNAME
¶ Productname
-
gxapi.
SYS_INFO_PRODUCTNAME
= 6
-
-
SYS_INFO_SERVERNAME
¶ Servername
-
gxapi.
SYS_INFO_SERVERNAME
= 7
-
-
SYS_INFO_LEGALCOPYRIGHT
¶ Legalcopyright
-
gxapi.
SYS_INFO_LEGALCOPYRIGHT
= 8
-
-
SYS_INFO_REGISTRY
¶ Registry
-
gxapi.
SYS_INFO_REGISTRY
= 9
-
-
SYS_INFO_REGISTRY_ENVIRONMENT
¶ Registry environment
-
gxapi.
SYS_INFO_REGISTRY_ENVIRONMENT
= 10
-
-
SYS_INFO_REGISTRY_SUPPORT
¶ Registry support
-
gxapi.
SYS_INFO_REGISTRY_SUPPORT
= 11
-
-
SYS_INFO_REGISTRY_INTERAPP
¶ Registry interapp
-
gxapi.
SYS_INFO_REGISTRY_INTERAPP
= 12
-
-
SYS_INFO_OIS_REGISTRY
¶ Ois registry
-
gxapi.
SYS_INFO_OIS_REGISTRY
= 13
-
-
SYS_INFO_TEST_REGISTRY
¶ Test registry
-
gxapi.
SYS_INFO_TEST_REGISTRY
= 14
-
SYS_LINEAGE_SOURCE constants¶
Type of lineage sources
-
SYS_LINEAGE_SOURCE_MAP
¶ Map
-
gxapi.
SYS_LINEAGE_SOURCE_MAP
= 0
-
-
SYS_LINEAGE_SOURCE_MXD
¶ Mxd
-
gxapi.
SYS_LINEAGE_SOURCE_MXD
= 1
-
-
SYS_LINEAGE_SOURCE_DB
¶ Db
-
gxapi.
SYS_LINEAGE_SOURCE_DB
= 2
-
-
SYS_LINEAGE_SOURCE_MAPTEMPLATE
¶ Maptemplate
-
gxapi.
SYS_LINEAGE_SOURCE_MAPTEMPLATE
= 3
-
-
SYS_LINEAGE_SOURCE_GRID
¶ Grid
-
gxapi.
SYS_LINEAGE_SOURCE_GRID
= 4
-
-
SYS_LINEAGE_SOURCE_VOXEL
¶ Voxel
-
gxapi.
SYS_LINEAGE_SOURCE_VOXEL
= 5
-
SYS_PATH constants¶
Get specific Geosoft paths. The path name will have a directory separator at the end.
-
SYS_PATH_LOCAL
¶ Is the workspace working directory
-
gxapi.
SYS_PATH_LOCAL
= 0
-
-
SYS_PATH_GEOSOFT
¶ Is the geosoft installation directory (read-only)
-
gxapi.
SYS_PATH_GEOSOFT
= 1
-
-
SYS_PATH_GEOSOFT_USER
¶ is the geosoft installation directory that contains user read/write files.
-
gxapi.
SYS_PATH_GEOSOFT_USER
= 2
-
-
SYS_PATH_GEOTEMP
¶ Geosoft Temp folder
-
gxapi.
SYS_PATH_GEOTEMP
= 3
-
-
SYS_PATH_WINDOWS
¶ Windows folder
-
gxapi.
SYS_PATH_WINDOWS
= 4
-
-
SYS_PATH_SYSTEM
¶ System folder
-
gxapi.
SYS_PATH_SYSTEM
= 5
-
-
SYS_PATH_LICENSE
¶ Where the license file is stored
-
gxapi.
SYS_PATH_LICENSE
= 6
-
-
SYS_PATH_RESOURCEFILES
¶ User RESOURCEFILES Folder
-
gxapi.
SYS_PATH_RESOURCEFILES
= 7
-
-
SYS_PATH_GEOSOFT_BAR
¶ BAR folder
-
gxapi.
SYS_PATH_GEOSOFT_BAR
= 100
-
-
SYS_PATH_GEOSOFT_BIN
¶ BIN folder
-
gxapi.
SYS_PATH_GEOSOFT_BIN
= 101
-
-
SYS_PATH_GEOSOFT_CSV
¶ CSV folder
-
gxapi.
SYS_PATH_GEOSOFT_CSV
= 102
-
-
SYS_PATH_GEOSOFT_CSV_ALIASES
¶ CSV ALIASES folder
-
gxapi.
SYS_PATH_GEOSOFT_CSV_ALIASES
= 103
-
-
SYS_PATH_GEOSOFT_DATA
¶ DATA folder
-
gxapi.
SYS_PATH_GEOSOFT_DATA
= 104
-
-
SYS_PATH_GEOSOFT_DBG
¶ DBG folder
-
gxapi.
SYS_PATH_GEOSOFT_DBG
= 105
-
-
SYS_PATH_GEOSOFT_ENCRYPTEDFILES
¶ Encrypted Files folder
-
gxapi.
SYS_PATH_GEOSOFT_ENCRYPTEDFILES
= 106
-
-
SYS_PATH_GEOSOFT_ETC
¶ ETC folder
-
gxapi.
SYS_PATH_GEOSOFT_ETC
= 107
-
-
SYS_PATH_GEOSOFT_FONTS
¶ FONTS folder
-
gxapi.
SYS_PATH_GEOSOFT_FONTS
= 108
-
-
SYS_PATH_GEOSOFT_GS
¶ GS folder
-
gxapi.
SYS_PATH_GEOSOFT_GS
= 110
-
-
SYS_PATH_GEOSOFT_PYGX
¶ PYGX folder
-
gxapi.
SYS_PATH_GEOSOFT_PYGX
= 126
-
-
SYS_PATH_GEOSOFT_GX
¶ GX folder
-
gxapi.
SYS_PATH_GEOSOFT_GX
= 111
-
-
SYS_PATH_GEOSOFT_HLP
¶ HLP folder
-
gxapi.
SYS_PATH_GEOSOFT_HLP
= 112
-
-
SYS_PATH_GEOSOFT_INI
¶ INI folder
-
gxapi.
SYS_PATH_GEOSOFT_INI
= 114
-
-
SYS_PATH_GEOSOFT_MAPTEMPLATE
¶ GXMAPTEMPLATE
folder-
gxapi.
SYS_PATH_GEOSOFT_MAPTEMPLATE
= 115
-
-
SYS_PATH_GEOSOFT_OMN
¶ OMN folder
-
gxapi.
SYS_PATH_GEOSOFT_OMN
= 116
-
-
SYS_PATH_GEOSOFT_PAGE
¶ PAGE folder
-
gxapi.
SYS_PATH_GEOSOFT_PAGE
= 117
-
-
SYS_PATH_GEOSOFT_SCHEMA
¶ SCHEMA folder
-
gxapi.
SYS_PATH_GEOSOFT_SCHEMA
= 118
-
-
SYS_PATH_GEOSOFT_SPEC_INI
¶ SPEC INI older
-
gxapi.
SYS_PATH_GEOSOFT_SPEC_INI
= 119
-
-
SYS_PATH_GEOSOFT_STYLESHEETS
¶ STYLE SHEETS folder
-
gxapi.
SYS_PATH_GEOSOFT_STYLESHEETS
= 120
-
-
SYS_PATH_GEOSOFT_TBL
¶ TBL folder
-
gxapi.
SYS_PATH_GEOSOFT_TBL
= 121
-
-
SYS_PATH_GEOSOFT_USER_CSV
¶ User CSV Folder
-
gxapi.
SYS_PATH_GEOSOFT_USER_CSV
= 200
-
-
SYS_PATH_GEOSOFT_USER_ETC
¶ User ETC Folder
-
gxapi.
SYS_PATH_GEOSOFT_USER_ETC
= 201
-
-
SYS_PATH_GEOSOFT_USER_GS
¶ User GS Folder
-
gxapi.
SYS_PATH_GEOSOFT_USER_GS
= 202
-
-
SYS_PATH_GEOSOFT_USER_GX
¶ User GX Folder
-
gxapi.
SYS_PATH_GEOSOFT_USER_GX
= 217
-
-
SYS_PATH_GEOSOFT_USER_PYGX
¶ User PYGX Folder
-
gxapi.
SYS_PATH_GEOSOFT_USER_PYGX
= 216
-
-
SYS_PATH_GEOSOFT_USER_HLP
¶ User HLP Folder
-
gxapi.
SYS_PATH_GEOSOFT_USER_HLP
= 203
-
-
SYS_PATH_GEOSOFT_USER_INI
¶ User INI Folder
-
gxapi.
SYS_PATH_GEOSOFT_USER_INI
= 204
-
-
SYS_PATH_GEOSOFT_USER_LIC
¶ User LIC Folder
-
gxapi.
SYS_PATH_GEOSOFT_USER_LIC
= 205
-
-
SYS_PATH_GEOSOFT_USER_MAPTEMPLATE
¶ User
GXMAPTEMPLATE
Folder-
gxapi.
SYS_PATH_GEOSOFT_USER_MAPTEMPLATE
= 206
-
-
SYS_PATH_GEOSOFT_USER_OMN
¶ User OMN Folder
-
gxapi.
SYS_PATH_GEOSOFT_USER_OMN
= 207
-
-
SYS_PATH_GEOSOFT_USER_STACKS
¶ User STACKS Folder
-
gxapi.
SYS_PATH_GEOSOFT_USER_STACKS
= 209
-
-
SYS_PATH_GEOSOFT_USER_TEMP
¶ User TEMP Folder
-
gxapi.
SYS_PATH_GEOSOFT_USER_TEMP
= 210
-
-
SYS_PATH_USER_SERVICES
¶ User SERVICES Folder
-
gxapi.
SYS_PATH_USER_SERVICES
= 211
-
-
SYS_PATH_USER_STYLESHEETS
¶ User STYLESHEETS Folder
-
gxapi.
SYS_PATH_USER_STYLESHEETS
= 212
-
SYS_RUN_DISPLAY constants¶
Windows Display Options Determine how applications are started. These options are not yet implemented.
-
SYS_RUN_DISPLAY_WINDOW
¶ In a window (default)
-
gxapi.
SYS_RUN_DISPLAY_WINDOW
= 0
-
-
SYS_RUN_DISPLAY_MINIMIZE
¶ Maximized
-
gxapi.
SYS_RUN_DISPLAY_MINIMIZE
= 8
-
-
SYS_RUN_DISPLAY_FULLSCREEN
¶ Full Screen
-
gxapi.
SYS_RUN_DISPLAY_FULLSCREEN
= 16
-
SYS_RUN_HOLD constants¶
DOS Console Options These options determine if and when the DOS/EXE console window is held. These options only work on DOS and EXE programs.
-
SYS_RUN_HOLD_NEVER
¶ Don’t wait (Default)
-
gxapi.
SYS_RUN_HOLD_NEVER
= 0
-
-
SYS_RUN_HOLD_ONERROR
¶ Hold the screen if there is an error
-
gxapi.
SYS_RUN_HOLD_ONERROR
= 512
-
-
SYS_RUN_HOLD_ALWAYS
¶ Always hold the screen
-
gxapi.
SYS_RUN_HOLD_ALWAYS
= 1024
-
SYS_RUN_TYPE constants¶
Type of application to run
-
SYS_RUN_TYPE_DOS
¶ Things such as .BAT files, copy commands, etc. (A console window is created)
-
gxapi.
SYS_RUN_TYPE_DOS
= 1
-
-
SYS_RUN_TYPE_EXE
¶ Any program (.EXE) (a console window is created)
-
gxapi.
SYS_RUN_TYPE_EXE
= 0
-
-
SYS_RUN_TYPE_WINDOWS
¶ Windows applications that do not require a console window.
-
gxapi.
SYS_RUN_TYPE_WINDOWS
= 2
-
SYS_RUN_WIN constants¶
Windows Options Should we wait for the application to finish or should we continue executing. If you wait for another program, Oasis montaj will not redraw or respond. We always wait for EXE and DOS programs.
-
SYS_RUN_WIN_NOWAIT
¶ Never wait (default)
-
gxapi.
SYS_RUN_WIN_NOWAIT
= 0
-
-
SYS_RUN_WIN_WAIT
¶ Always wait
-
gxapi.
SYS_RUN_WIN_WAIT
= 2048
-
SYS_SEARCH_PATH constants¶
Find File define
-
FIND_LOCAL_GEOSOFT
¶ Local and then Geosoft directory
-
gxapi.
FIND_LOCAL_GEOSOFT
= 0
-
-
FIND_GEOSOFT
¶ Geosoft directory
-
gxapi.
FIND_GEOSOFT
= 1
-
-
FIND_LOCAL
¶ Local directory
-
gxapi.
FIND_LOCAL
= 2
-
-
FIND_SHORT
¶ Make the name short (FLAG that is added on)
-
gxapi.
FIND_SHORT
= 1024
-
SYS_ENCRYPTION_KEY constants¶
How to encrypt a string. Determines the portability of the encrypted string.
-
SYS_ENCRYPTION_KEY_GEOSOFT_ID
¶ Encrypt string to currently signed-in user. The string can be decrypted by the same user on any machine.
-
gxapi.
SYS_ENCRYPTION_KEY_GEOSOFT_ID
= 0
-
-
SYS_ENCRYPTION_KEY_GLOBAL_ID
¶ Encrypt string to current machine. The string can be decrypted by any user on the same machine.
-
gxapi.
SYS_ENCRYPTION_KEY_GLOBAL_ID
= 1
-
TD_ICON constants¶
TaskDialog Icon
-
TD_ICON_NONE
¶ No icon.
-
gxapi.
TD_ICON_NONE
= 0
-
-
TD_ICON_WARNING
¶ An exclamation-point icon appears in the task dialog.
-
gxapi.
TD_ICON_WARNING
= 1
-
-
TD_ICON_ERROR
¶ A stop-sign icon appears in the task dialog.
-
gxapi.
TD_ICON_ERROR
= 2
-
-
TD_ICON_INFORMATION
¶ An icon consisting of a lowercase letter i in a circle appears in the task dialog.
-
gxapi.
TD_ICON_INFORMATION
= 3
-
-
TD_ICON_SUCCESS
¶ A shield icon appears in the task dialog.
-
gxapi.
TD_ICON_SUCCESS
= 4
-
-
TD_ICON_CONFIRMATION
¶ A shield icon appears in the task dialog.
-
gxapi.
TD_ICON_CONFIRMATION
= 5
-
TD_BUTTON constants¶
TaskDialog Common Buttons
-
TD_BUTTON_NONE
¶ No common buttons.
-
gxapi.
TD_BUTTON_NONE
= 1
-
-
TD_BUTTON_CANCEL
¶ Button results in
TD_ID_CANCEL
return value.-
gxapi.
TD_BUTTON_CANCEL
= 8
-
-
TD_BUTTON_RETRY
¶ Button results in
TD_ID_RETRY
return value.-
gxapi.
TD_BUTTON_RETRY
= 16
-
-
TD_BUTTON_CLOSE
¶ Button results in
TD_ID_CLOSE
return value.-
gxapi.
TD_BUTTON_CLOSE
= 32
-
TD_ID constants¶
TaskDialog Common Button Return Values
-
TD_ID_OK
¶ TD_BUTTON_OK
pressed.-
gxapi.
TD_ID_OK
= 1
-
-
TD_ID_CANCEL
¶ TD_BUTTON_CANCEL
pressed.-
gxapi.
TD_ID_CANCEL
= 2
-
-
TD_ID_RETRY
¶ TD_BUTTON_RETRY
pressed.-
gxapi.
TD_ID_RETRY
= 4
-
-
TD_ID_YES
¶ TD_BUTTON_YES
pressed.-
gxapi.
TD_ID_YES
= 6
-
-
TD_ID_NO
¶ TD_BUTTON_NO
pressed.-
gxapi.
TD_ID_NO
= 7
-
-
TD_ID_CLOSE
¶ TD_BUTTON_CLOSE
pressed.-
gxapi.
TD_ID_CLOSE
= 8
-