GXARCMAP class¶
-
class
GXARCMAP
(handle=0)¶ GXARCMAP class.
This library is not a class. It contains various utilities used in maps and layers by the Geosoft extensions for ArcGIS.
-
classmethod
change_size
(x, y)¶ Changes the custom page size of the ArcGIS Map document.
Parameters: - x (float) – X Size (mm)
- y (float) – Y Size (mm)
New in version 8.0.
License: Geosoft Open License
-
classmethod
display_in_3d_view
(file)¶ Display a file in 3D view
Parameters: file (str) – File Name New in version 8.0.
License: Geosoft Open License
-
classmethod
export_feature_layer_by_name_to_3d_file
(mxd_file, dataframe_name, layer_name, output_file)¶ Exports the shapes from a feature layer of the ArcMap document to a 3D File.
Parameters: - mxd_file (str) –
GXMXD
filename - dataframe_name (str) – Dataframe name
- layer_name (str) – Layer name
- output_file (str) – Output file name
New in version 8.0.
License: Geosoft Extended End-User License
- mxd_file (str) –
-
classmethod
export_selected_feature_layer_to_3d_file
(output_file)¶ Exports the shapes from the currently selected feature layer (if any) in ArcMap to a 3D file (only on oriented frames i.e. sections).
Parameters: output_file (str) – Output file name New in version 8.0.
License: Geosoft Extended End-User License
-
classmethod
get_current_document_info
(mxd, layer, map)¶ Get some info on the current
GXMXD
in ArcMap and selected layer (if any)Parameters: New in version 8.0.
License: Geosoft Open License
-
classmethod
get_ipj_for_predefined_esri_gcs
(ipj, esri_gcs_code)¶ Fills an
GXIPJ
with a predefined ESRI GCSParameters: New in version 8.0.1.
License: Geosoft Extended End-User License
-
classmethod
get_ipj_for_predefined_esri_pcs
(ipj, esri_pcs_code)¶ Fills an
GXIPJ
with a predefined ESRI PCSParameters: New in version 8.0.1.
License: Geosoft Extended End-User License
-
classmethod
get_number_of_selected_layers
()¶ Get the number of selected layers in the TOC
Returns The number of layers selected.
Return type: int New in version 8.0.
License: Geosoft Open License
-
classmethod
get_selected_layer_info
(layer_number, layer, map)¶ Get the name info on the specified selected layer
Parameters: New in version 8.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_lyr
(file)¶ Load a LYR file to the current data frame
Parameters: file (str) – File Name New in version 8.0.
License: Geosoft Open License
-
classmethod
load_map
(map, view, extra_csv, layer_tag, fit, activate, prefix)¶ Loads a Geosoft map into the current ArcMap document
Parameters: - map (str) – Map File Name
- view (str) – View Name
- extra_csv (str) – Optional Extra Datasets CSV Filename (Rasters and shape files to display with layers)
- layer_tag (str) – Optional frame/layer tag (suffix)
- fit (int) – Fit to map size
- activate (bool) – Activate view (3D)
- prefix (bool) – Layer name tag is prefix
New in version 8.0.
License: Geosoft Open License
Note: The extra datasets CSV should contain the the following fields:
ID - Unique identifier DATASOURCE - Filename TYPE - RASTER and SHAPE supported MAPMATCH - Map to associate with (used for grouping logic) VIEWMATCH - View to match with in associated map (used for grouping logic) ZONEFILE - Used for type RASTER
-
classmethod
load_map_ex
(map, view, extra_csv, layer_tag, flags)¶ Loads a Geosoft map into the ArcMap document, specifying which View to use as Data view.
Parameters: - map (str) – Map File Name
- view (str) – View Name
- extra_csv (str) – Optional Extra Datasets CSV Filename (Rasters and shape files to display with layers)
- layer_tag (str) – Optional frame/layer tag (suffix)
- flags (int) – Combination of ARCMAP_LOAD_FLAGS constants
Returns: 0 - OK 1 - Error -1 - Canceled
Return type: int
New in version 8.0.
License: Geosoft Open License
Note: The extra datasets CSV should contain the the following fields:
ID - Unique identifier DATASOURCE - Filename TYPE - RASTER and SHAPE supported MAPMATCH - Map to associate with (used for grouping logic) VIEWMATCH - View to match with in associated map (used for grouping logic) ZONEFILE - Used for type RASTER
-
classmethod
load_map_view
(map, view, layer, all)¶ Load a Geosoft Map as a layer into the current data frame
Parameters: - map (str) – Map File Name
- view (str) – View Name
- layer (str) – Layer Name
- all (int) – Pass TRUE to also render other views in map (Use second parameter view for location)
New in version 8.0.
License: Geosoft Open License
-
classmethod
load_raster
(file)¶ Load a raster file to the current data frame
Parameters: file (str) – File Name New in version 8.0.
License: Geosoft Open License
Note: Loads any file type recognized as “raster” formats by ARC
GXGIS
. This includes geosoft GRD files.
-
classmethod
load_shape
(file, layer_prefix, layer_suffix)¶ Load a
GXSHP
file to the current data frameParameters: - file (str) – File Name
- layer_prefix (str) – Layer Name Prefix: An underscore is added automatically
- layer_suffix (str) – Layer Name Suffix An underscore is added automatically
New in version 8.0.
License: Geosoft Open License
Note: The input layer name is created using the (optional) prefix and suffix as follows:
Prefix_NAME_Suffix
-
classmethod
load_spf
(shp, num_shp)¶ Load all the shape files generated by importing a SPF into ArcMap.
Parameters: - shp (str) – List of shape files to load
- num_shp (int) – Number of shape files
Returns: 0- OK, 1 - Error, -1 - Cancel
Return type: int
New in version 8.0.
License: Geosoft Open License
-
classmethod
map_view_to_shape
(map, view, shp, lst)¶ Create
GXSHP
file(s) from a Geosoft Map view.Parameters: New in version 8.0.
License: Geosoft Open License
Note: The output
GXSHP
file name(s) are made up as follows (where NAME is the inputGXSHP
file name):NAME_pt.shp (point objects) NAME_ln.shp (line or arc objects) NAME_pg.shp (polygon objects)
-
classmethod
null
()¶ A null (undefined) instance of
GXARCMAP
Returns: A null GXARCMAP
Return type: GXARCMAP
-
classmethod
query_size
(x, y)¶ Query the page size in mm of the entire map page.
Parameters: New in version 8.0.
License: Geosoft Open License
-
classmethod
show_layer_by_name_in_3d
(mxd_file, dataframe_name, layer_name)¶ Shows a layer in ArcMap in a 3D view in an
GXMXD
Parameters: - mxd_file (str) –
GXMXD
filename - dataframe_name (str) – Dataframe name
- layer_name (str) – Layer name
New in version 8.0.
License: Geosoft Extended End-User License
- mxd_file (str) –
-
classmethod
show_selected_layers_in_3d
()¶ Shows the selected layers in ArcMap in a 3D view
New in version 8.0.
License: Geosoft Extended End-User License
-
classmethod
ARCMAP_LOAD_FLAGS constants¶
Flags that can be combined and passed to iLoadMap_ARCMAP
-
ARCMAP_LOAD_DELFRAME
¶ If an existing frame is found delete it
-
gxapi.
ARCMAP_LOAD_DELFRAME
= 1
-
-
ARCMAP_LOAD_DELLAYER
¶ If an existing layer is found delete it
-
gxapi.
ARCMAP_LOAD_DELLAYER
= 2
-
-
ARCMAP_LOAD_EXISTFRAME
¶ If an existing frame is found add new layers to it
-
gxapi.
ARCMAP_LOAD_EXISTFRAME
= 4
-
-
ARCMAP_LOAD_COPYLAYER
¶ If an existing layer is found make a copy
-
gxapi.
ARCMAP_LOAD_COPYLAYER
= 8
-
-
ARCMAP_LOAD_HIDESIBLINGS
¶ Hide all other existing layers in frame
-
gxapi.
ARCMAP_LOAD_HIDESIBLINGS
= 16
-
-
ARCMAP_LOAD_PREFIXMAPFRAME
¶ Prefix the map filename part as part of the frame name
-
gxapi.
ARCMAP_LOAD_PREFIXMAPFRAME
= 32
-
-
ARCMAP_LOAD_PREFIXMAPLAYER
¶ Prefix the map filename part as part of the layer name
-
gxapi.
ARCMAP_LOAD_PREFIXMAPLAYER
= 64
-
-
ARCMAP_LOAD_MERGETOSINGLEVIEW
¶ Will render all views in single layer with the data view defining the coordinate system
-
gxapi.
ARCMAP_LOAD_MERGETOSINGLEVIEW
= 128
-
-
ARCMAP_LOAD_INTOCURRENTFRAME
¶ Load everything into the current data frame
-
gxapi.
ARCMAP_LOAD_INTOCURRENTFRAME
= 256
-
-
ARCMAP_LOAD_NOMAPLAYERS
¶ Use the map only for sizing data frames in layout, only load extra datasets.
-
gxapi.
ARCMAP_LOAD_NOMAPLAYERS
= 512
-
-
ARCMAP_LOAD_ACTIVATE
¶ Activates the main quickmap layer when done (e.g. 3D Viewer)
-
gxapi.
ARCMAP_LOAD_ACTIVATE
= 1024
-
-
ARCMAP_LOAD_NEW
¶ New method for loading maps introduced in 7.1. Will mimic what happens in montaj (i.e. base groups and 3D become graphics and views gets split into separate LYRs).
-
gxapi.
ARCMAP_LOAD_NEW
= 2048
-
-
ARCMAP_LOAD_NAMETAGISPREFIX
¶ Use a provided name tag as prefix when naming a newly created map layer.
-
gxapi.
ARCMAP_LOAD_NAMETAGISPREFIX
= 4096
-