GXSYS classΒΆ

class GXSYS(handle=0)[source]ΒΆ

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"

__init__(handle=0)[source]ΒΆ
classmethod abort(message)[source]ΒΆ

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)[source]ΒΆ

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)[source]ΒΆ

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)[source]ΒΆ

Add a source to the current lineage object

Parameters:

New in version 7.0.

License: Geosoft Open License

classmethod assert_(exp)[source]ΒΆ

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)[source]ΒΆ

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 and terminate functions if you would like to provide a more specific error message.

classmethod backup_geo_file(data, target)[source]ΒΆ

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)[source]ΒΆ

Breaks a decimal date value into year, month and day.

Parameters:
  • date (float) – Date value to break

  • year (int_ref) – Year

  • month (int_ref) – Month (0-11)

  • day (int_ref) – Day (0-30)

New in version 5.1.1.

License: Geosoft Open License

classmethod cancel_()[source]ΒΆ

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()[source]ΒΆ

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)[source]ΒΆ

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_arc_sdk_license_ex(version)[source]ΒΆ

Check to see if a ESRI ArcGIS Pro SDK and Map SDK license is available, returns type and version of available engine.

Parameters:

version (str_ref) – Version String

Returns:

ARC_SDK_LICENSE

Return type:

int

New in version 2024.1.

License: Geosoft Open License

classmethod check_intrinsic(cl, name)[source]ΒΆ

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_product_updates(silent)[source]ΒΆ

Check for product updates via Geosoft Connect

Parameters:

silent (bool) – Do not show notification if no updates available.

New in version 9.6.

License: Geosoft Open License

classmethod check_stop()[source]ΒΆ

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()[source]ΒΆ

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)[source]ΒΆ

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)[source]ΒΆ

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()[source]ΒΆ

Clear all the lineage parameters

New in version 7.0.

License: Geosoft Open License

classmethod clear_lineage_sources()[source]ΒΆ

Clear all the lineage sources

New in version 7.0.

License: Geosoft Open License

classmethod clear_menus(flag)[source]ΒΆ

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()[source]ΒΆ

Clears all paramters.

New in version 5.0.

License: Geosoft Open License

classmethod clipboard_to_file(file)[source]ΒΆ

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 connect_with_current_central_instance(name, base_path, url, token)[source]ΒΆ

Query information necessary to communicate with current Central Instance

Parameters:
  • name (str_ref) – Instance name

  • base_path (str_ref) – Base path (single port support)

  • url (str_ref) – URL

  • token (str_ref) – Authorization token

New in version 9.8.

License: Geosoft Open License

classmethod copy_file(src_file, dest_file)[source]ΒΆ

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)[source]ΒΆ

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)[source]ΒΆ

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)[source]ΒΆ

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()[source]ΒΆ

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()[source]ΒΆ

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 dat_list_lst(DAT_Type, FileOpenMode, FileType)[source]ΒΆ

Returns a LST of Grid/Image types as names and qualifiers as values`GXLST <geosoft.gxapi.GXLST>` Example: NAME: β€œGeosoft default (*.grd)” VALUE: β€œGRD”

Parameters:
Return type:

GXLST

New in version 2024.1.

License: Geosoft Open License

classmethod date()[source]ΒΆ

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)[source]ΒΆ

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)[source]ΒΆ

Decrypts a string that has been previously encrypted by encrypt_string.

Parameters:

New in version 9.0.

License: Geosoft Open License

classmethod default_double(group, field, val)[source]ΒΆ

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)[source]ΒΆ

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)[source]ΒΆ

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)[source]ΒΆ

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_directory(directory)[source]ΒΆ

Delete a directory and all files/subdirectories contained therein.

Parameters:

directory (str) – Name of directory to delete

New in version 2023.2.

License: Geosoft Open License

classmethod delete_file(file)[source]ΒΆ

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)[source]ΒΆ

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)[source]ΒΆ

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)[source]ΒΆ

Destroy PTMP.

Parameters:

ptmp (int) – PTMP object to destroy

New in version 5.0.

License: Geosoft Open License

classmethod dir_exist(dir)[source]ΒΆ

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()[source]ΒΆ

Disable GX Debugger GXGUI if active

New in version 5.0.

License: Geosoft Open License

Note: All breakpoints will be cleared by this call.

classmethod display_double(title, real)[source]ΒΆ

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)[source]ΒΆ

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)[source]ΒΆ

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, n)[source]ΒΆ

Display an integer.

Parameters:
  • title (str) – Title of the Window

  • n (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)[source]ΒΆ

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)[source]ΒΆ

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)[source]ΒΆ

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)[source]ΒΆ

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 in GXLST 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)[source]ΒΆ

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 tool

See also

shell_execute

classmethod emf_object_size(file, size_x, size_y)[source]ΒΆ

Get the size of an EMF object

Parameters:
  • file (str) – EMF File holding data

  • size_x (float_ref) – Size X

  • size_y (float_ref) – Size Y

New in version 6.4.

License: Geosoft Open License

classmethod enable_gx_debugger(src_dir, first_gx)[source]ΒΆ

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)[source]ΒΆ

Encrypts a string for secure storage in configuration files or in the workspace parameters.

Parameters:

New in version 9.0.

License: Geosoft Open License

classmethod error(error_file, module, error)[source]ΒΆ

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 the GXGER 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)[source]ΒΆ

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)[source]ΒΆ

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)[source]ΒΆ

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)[source]ΒΆ

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)[source]ΒΆ

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_()[source]ΒΆ

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)[source]ΒΆ

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)[source]ΒΆ

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)[source]ΒΆ

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)[source]ΒΆ

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)[source]ΒΆ

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)[source]ΒΆ

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)[source]ΒΆ

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)[source]ΒΆ

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)[source]ΒΆ

Fill a GXVV with files matching an input file mask.

Parameters:
  • vv (GXVV) – GXVV object

  • mask (str) – File mask to match

New in version 5.0.

License: Geosoft Open License

Note: Fill a GXVV with files matching the input file mask. The GXVV should be of string type.

classmethod find_path(file, mode, fullname)[source]ΒΆ

Get full path for a file with Geosoft subdirectory parameter.

Parameters:
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)[source]ΒΆ

Get full path for a file.

Parameters:
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)[source]ΒΆ

List all Windows and geosoft fonts.

Parameters:

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, then SYS_FONT_GFN, or vice-versa to change order of listing.

classmethod generate_guid(guid)[source]ΒΆ

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 geosoft_connect_authenticate_and_navigate(url)[source]ΒΆ

Automatically authenticate and navigate to my.geosoft.com URL

Parameters:

url (str) – URL

New in version 9.4.

License: Geosoft Open License

classmethod get_directory(sys_dir, dir)[source]ΒΆ

Get a directory path

Parameters:

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)[source]ΒΆ

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)[source]ΒΆ

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)[source]ΒΆ

Get the Entitlement Rights

Parameters:

lst_rights (GXLST) – Rights

New in version 9.0.

License: Geosoft Open License

classmethod get_env(parm, set)[source]ΒΆ

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_ap(err)[source]ΒΆ

Get the error number of an error.

Parameters:

err (int) – The error index (0 to N-1, where N=number of registered errors)

Returns:

The error number registered, 0 if none registered.

Return type:

int

New in version 9.6.

License: Geosoft Open License

classmethod get_error_message_ap(err, err_str)[source]ΒΆ

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()[source]ΒΆ

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_geosoft_id(id)[source]ΒΆ

Get the Geosoft ID (email) if signed in

Parameters:

id (str_ref) – Returned ID

New in version 9.4.

License: Geosoft Open License

classmethod get_int(group, field)[source]ΒΆ

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)[source]ΒΆ

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)[source]ΒΆ

Get the licensed user name and Company

Parameters:
  • user (str_ref) – User Name

  • company (str_ref) – Company Name

New in version 6.0.

License: Geosoft Open License

classmethod get_loaded_menus(lst_default, lst_loaded, lst_user)[source]ΒΆ

Get the loaded menus.

Parameters:
  • lst_default (GXLST) – Default menus (typically a single entry based on product)

  • 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.

classmethod get_path(type, path)[source]ΒΆ

Get a Geosoft path

Parameters:

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)[source]ΒΆ

Gets pattern parameters from the parameter block.

Parameters:
  • group (str) – Input group name

  • pat (int_ref) – Pattern

  • size (float_ref) – Size,

  • thick (int_ref) – Thick (0-100)

  • dense (float_ref) – Density,

  • col (int_ref) – Pattern Color

  • back_col (int_ref) – Background Color

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_profile_name(name)[source]ΒΆ

Get the profile name as defined in My Geosoft (or email if not defined)

Parameters:

name (str_ref) – Returned name

New in version 9.4.

License: Geosoft Open License

classmethod get_profile_url(url)[source]ΒΆ

Get link to my.geosoft.com profile URL

Parameters:

url (str_ref) – Returned URL

New in version 9.4.

License: Geosoft Open License

classmethod get_ptmp(ptmp)[source]ΒΆ

Get temporary saves copy of parameter block.

Parameters:

ptmp (int) – Saved with Save_PTMP_SYS

New in version 5.0.

License: Geosoft Open License

classmethod get_publish_path_for_central(project_uuid, cache_path)[source]ΒΆ

Get cache path to publish datasets to Central

Parameters:
  • project_uuid (str) – Project UUID

  • cache_path (str_ref) – Returned cache path

New in version 2021.2.

License: Geosoft Open License

classmethod get_reg(reg, group)[source]ΒΆ

Get GXREG parameters.

Parameters:
  • reg (GXREG) – GXREG to add parameters to

  • group (str) – Group name wanted

New in version 5.0.

License: Geosoft Open License

classmethod get_settings_meta(meta)[source]ΒΆ

Get the settings metadata object.

Parameters:

meta (GXMETA) – GXMETA object to store the settings metadata in

New in version 6.0.

License: Geosoft Open License

classmethod get_sys_info(sys_info, info)[source]ΒΆ

Get system information

Parameters:

New in version 5.0.

License: Geosoft Open License

classmethod get_thread_id()[source]ΒΆ

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)[source]ΒΆ

Return the elapsed time since the established time.

Parameters:
  • flag (int) – 1 - set start time, 0 - return elapsed time

  • start_time (float_ref) – Start time in seconds

  • elapsed_time (float_ref) – Elapsed time in seconds

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()[source]ΒΆ

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)[source]ΒΆ

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)[source]ΒΆ

Get a copy of the workspace GXREG;

Parameters:

reg (GXREG) – GXREG object

New in version 5.0.

License: Geosoft Open License

Note: The workspace GXREG is separate from the reg used to store GXSYS parameters.

Because get_workspace_reg returns a copy of the workspace GXREG, and not the workspace GXREG itself, you must call set_workspace_reg if you make changes to your own GXREG object and you wish them to take effect in the workspace GXREG.

classmethod get_yes_no(group, field)[source]ΒΆ

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)[source]ΒΆ

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)[source]ΒΆ

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)[source]ΒΆ

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)[source]ΒΆ

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)[source]ΒΆ

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()[source]ΒΆ

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)[source]ΒΆ

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()[source]ΒΆ

Check if this is a null (undefined) instance

Returns:

True if this is a null (undefined) instance, False otherwise.

Return type:

bool

classmethod is_signed_in()[source]ΒΆ

Check if signed in via Geosoft Connect

Return type:

bool

New in version 9.4.

License: Geosoft Open License

classmethod load_parm(file, groups)[source]ΒΆ

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_background_task(location)[source]ΒΆ

This method logs that a background task was run

Parameters:

location (str) – Location that launched the background task

New in version 2014.1.

License: Geosoft Open License

classmethod log_script_run(location)[source]ΒΆ

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)[source]ΒΆ

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)[source]ΒΆ

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)[source]ΒΆ

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)[source]ΒΆ

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)[source]ΒΆ

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)[source]ΒΆ

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 null()[source]ΒΆ

A null (undefined) instance of GXSYS

Returns:

A null GXSYS

Return type:

GXSYS

classmethod num_errors_ap()[source]ΒΆ

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)[source]ΒΆ

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)[source]ΒΆ

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()[source]ΒΆ

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)[source]ΒΆ

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)[source]ΒΆ

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)[source]ΒΆ

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)[source]ΒΆ

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 publish_datasets_to_central(instance_uuid, project_uuid, project_name, central_server_guid, central_branch_id, central_revision_id, metadata_as_json, parent_event_id)[source]ΒΆ

Publish datasets to Central

Parameters:
  • instance_uuid (str) – Central Instance UUID

  • project_uuid (str) – Project UUID

  • project_name (str) – Project name

  • central_server_guid (str_ref) – Central server GUID

  • central_branch_id (int_ref) – Branch ID

  • central_revision_id (int_ref) – Revision ID

  • metadata_as_json (str) – metadata as JSON

  • parent_event_id (str) – Parent Event ID

New in version 2021.2.

License: Geosoft Open License

classmethod registry_delete_key(domain, key)[source]ΒΆ

Delete a registry value

Parameters:
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)[source]ΒΆ

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)[source]ΒΆ

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)[source]ΒΆ

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)[source]ΒΆ

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)[source]ΒΆ

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)[source]ΒΆ

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)[source]ΒΆ

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)[source]ΒΆ

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()[source]ΒΆ

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)[source]ΒΆ

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)[source]ΒΆ

Run a command line process.

Parameters:
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:

  1. the local working directory

  2. the <geosoft>bin directory

  3. the system path

classmethod run_gs(gs)[source]ΒΆ

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

classmethod run_gx(gx)[source]ΒΆ

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

set_interactive and run_gs

classmethod run_multi_user_script(script, users, iterations, wait_min_time, wait_max_time, ramp_up_time)[source]ΒΆ

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)[source]ΒΆ

Run a PDF.

Parameters:
  • mnu (str) – Group name, can be β€œβ€.

  • pdf (str) – PDF name (.pdf assumed)

Returns:

Exit status: -1 cancelled 0 success 1 ended with an error.

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 run_python(gx, init_info)[source]ΒΆ

Run a Python GX script with initialization information.

Parameters:
  • gx (str) – Name of Python GX to run.

  • init_info (str) – Initialization information (usually JSON). Available withon Python script as a global variable named gx_init_info.

Returns:

Exit status of the GX: -1 cancelled 0 success 1 ended with an error.

Return type:

int

New in version 9.9.

License: Geosoft Open License

classmethod save_log(file)[source]ΒΆ

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)[source]ΒΆ

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)[source]ΒΆ

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.

classmethod script()[source]ΒΆ

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 calls

Return type:

int

New in version 6.0.1.

License: Geosoft Open License

classmethod script_record()[source]ΒΆ

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)[source]ΒΆ

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)[source]ΒΆ

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_background_run(mode)[source]ΒΆ

Sets the environment as running in the background.

Parameters:

mode (int) – 1 - background run is true, 0 background run is false

New in version 2024.1.

License: Geosoft Open License

classmethod set_cursor(cursor)[source]ΒΆ

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)[source]ΒΆ

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)[source]ΒΆ

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)[source]ΒΆ

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)[source]ΒΆ

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)[source]ΒΆ

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 and run_gs

classmethod set_lineage_description(description)[source]ΒΆ

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)[source]ΒΆ

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)[source]ΒΆ

Set the name for the current lineage object

Parameters:

name (str) – Name

New in version 7.0.

License: Geosoft Open License

classmethod set_loaded_menus(lst_default, lst_loaded, lst_user)[source]ΒΆ

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.

classmethod set_pattern(group, pat, size, thick, dense, col, back_col)[source]ΒΆ

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)[source]ΒΆ

Copy contents of a GXREG to current parameters.

Parameters:

reg (GXREG) – GXREG object

New in version 5.0.

License: Geosoft Open License

classmethod set_server_messages_ap(flag)[source]ΒΆ

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)[source]ΒΆ

Set the settings metadata object.

Parameters:

meta (GXMETA) – GXMETA object

New in version 6.0.

License: Geosoft Open License

classmethod set_string(group, field, val)[source]ΒΆ

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)[source]ΒΆ

Set the workspace GXREG;

Parameters:

reg (GXREG) – GXREG object

New in version 5.0.

License: Geosoft Open License

Note: The workspace GXREG is separate from the reg used to store GXSYS parameters.

Because get_workspace_reg returns a copy of the workspace GXREG, and not the workspace GXREG itself, you must call set_workspace_reg if you make changes to your own GXREG object and you wish them to take effect in the workspace GXREG

classmethod shell_execute(verb, file, parameters, directory, show)[source]ΒΆ

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

do_command

classmethod short_path_file_name(in_name, name)[source]ΒΆ

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 sign_in()[source]ΒΆ

Sign in via Geosoft Connect

New in version 9.4.

License: Geosoft Open License

classmethod temp_file_ext(ext, out)[source]ΒΆ

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)[source]ΒΆ

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)[source]ΒΆ

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, call error_tag to set any error message tags, call terminate and return.

Geosoft functions that detect an error will have already registered their own errors and called terminate.

classmethod testing_system_mode()[source]ΒΆ

Checks to see if the GX is running in the Geosoft testing system.

Returns:

0 - Normal operation 1 - Running in the Geosoft testing system.

Return type:

int

New in version 9.6.

License: Geosoft Open License

classmethod time()[source]ΒΆ

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)[source]ΒΆ

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)[source]ΒΆ

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)[source]ΒΆ

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()[source]ΒΆ

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)[source]ΒΆ

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)[source]ΒΆ

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()[source]ΒΆ

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)[source]ΒΆ

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)[source]ΒΆ

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)[source]ΒΆ

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

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ΒΆ
GEO_DIRECTORY_USER_TBL_FAVOURITESΒΆ

Geosoft\user\tbl\favourites

gxapi.GEO_DIRECTORY_USER_TBL_FAVOURITES = 27ΒΆ

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_GERΒΆ

GXGER folder

gxapi.SYS_DIR_GEOSOFT_GER = 109ΒΆ
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_IMGΒΆ

GXIMG folder

gxapi.SYS_DIR_GEOSOFT_IMG = 113ΒΆ
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_GEOSOFT_PYTHONΒΆ

PYTHON folder

gxapi.SYS_DIR_GEOSOFT_PYTHON = 127ΒΆ
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_IMGΒΆ

User GXIMG Folder

gxapi.SYS_DIR_USER_IMG = 215ΒΆ
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_FILE_FORM constantsΒΆ

File Open Mode

SYS_FILE_FORM_OPENΒΆ

Open File Mode

gxapi.SYS_FILE_FORM_OPEN = 0ΒΆ
SYS_FILE_FORM_SAVEΒΆ

Save File Mode

gxapi.SYS_FILE_FORM_SAVE = 1ΒΆ

SYS_DAT_FILE constantsΒΆ

DAT File Type

SYS_DAT_FILE_GRIDΒΆ

Grid Files

gxapi.SYS_DAT_FILE_GRID = 1ΒΆ
SYS_DAT_FILE_IMAGΒΆ

Image Files

gxapi.SYS_DAT_FILE_IMAG = 2ΒΆ

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_MENU_CLEAR constantsΒΆ

Font types

SYS_MENU_CLEAR_ALLΒΆ

Clear all menus excluding the coremenus.omn but including any default menus specified in the settings (these will not come back in this project).

gxapi.SYS_MENU_CLEAR_ALL = 0ΒΆ
SYS_MENU_CLEAR_DEFAULTΒΆ

Clear all menus excluding the coremenus.omn but reload any default menus specified in the settings (essentially this is a refresh back to the default state again).

gxapi.SYS_MENU_CLEAR_DEFAULT = 1ΒΆ

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_GERΒΆ

GXGER folder

gxapi.SYS_PATH_GEOSOFT_GER = 109ΒΆ
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_IMGΒΆ

GXIMG folder

gxapi.SYS_PATH_GEOSOFT_IMG = 113ΒΆ
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 = 0ΒΆ
TD_BUTTON_OKΒΆ

Button results in TD_ID_OK return value.

gxapi.TD_BUTTON_OK = 1ΒΆ
TD_BUTTON_YESΒΆ

Button results in TD_ID_YES return value.

gxapi.TD_BUTTON_YES = 2ΒΆ
TD_BUTTON_NOΒΆ

Button results in TD_ID_NO return value.

gxapi.TD_BUTTON_NO = 4ΒΆ
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ΒΆ