GXMVIEW class

class GXMVIEW(handle=0)

GXMVIEW class.

A view (GXMVIEW class) has a 2-D/3-D translation matrix, a map projection and a clip region. A view contains any number of “groups”, and each “group” contains one or more graphics elements (entities). Different types of groups will contain different types of entities:

Note:

GXCSYMB groups (color symbols) contain data and rules for presenting the data as color symbols. See col_symbol and the GXCSYMB class.

GXAGG groups (aggregates) contain images. See aggregate and the GXAGG class.

Standard groups contain symbols, lines, polylines, and polygons. See start_group.

aggregate(agg, name)

Add an aggregate to a view.

Parameters:

New in version 5.0.

License: Geosoft Open License

arc(x, y, radius, ratio, angle, start, end)

Draw an arc.

Parameters:
  • x (float) – Center x
  • y (float) – Center y
  • radius (float) – Radius
  • ratio (float) – Ratio x/y
  • angle (float) – Angle
  • start (float) – Start angle
  • end (float) – End angle

New in version 5.0.

License: Geosoft Open License

axis_x(y_loc, left, right, major_tick, minor_tick, tick_size)

Draw an X axis

Parameters:
  • y_loc (float) – Y location in view units
  • left (float) – Left X
  • right (float) – Right X
  • major_tick (float) – Major tick interval
  • minor_tick (float) – Minor tick interval (half size of major)
  • tick_size (float) – Tick size in view units (negative for down ticks)

New in version 5.0.

License: Geosoft Open License

Note: All coordinates are in view units.

See also

rOptimumTick_MVIEW

axis_y(x_loc, bottom, top, major_tick, minor_tick, tick_size)

Draw a Y axis

Parameters:
  • x_loc (float) – X location in view units
  • bottom (float) – Bottom Y
  • top (float) – Top Y
  • major_tick (float) – Major tick interval
  • minor_tick (float) – Minor tick interval (half size of major)
  • tick_size (float) – Tick size in view units (negative for left ticks)

New in version 5.0.

License: Geosoft Open License

Note: All coordinates are in view units.

See also

rOptimumTick_MVIEW

best_fit_window(m_min_x, m_min_y, m_max_x, m_max_y, v_min_x, v_min_y, v_max_x, v_max_y, fit_view)

Fit an area in ground coordinates centered to an area in mm on map or vise versa keeping X and Y scales the same.

Parameters:
  • m_min_x (float_ref) – X minimum (mm) of the area in map relative to map origin
  • m_min_y (float_ref) – Y minimum ..
  • m_max_x (float_ref) – X maximum ..
  • m_max_y (float_ref) – Y maximum ..
  • v_min_x (float_ref) – Min X in ground coordinate to fit to the area defined above
  • v_min_y (float_ref) – Min Y in ground coordinate ..
  • v_max_x (float_ref) – Max X in ground coordinate ..
  • v_max_y (float_ref) – Max Y in ground coordinate ..
  • fit_view (int) – MVIEW_FIT constants

New in version 5.1.8.

License: Geosoft Open License

Note: X and Y scales will be redefined and units will remain unchanged. The final X and Y ranges (if changed) are returned.

See also

fit_window

box_3d(min_x, min_y, min_z, max_x, max_y, max_z)

Draw a 3D box

Parameters:
  • min_x (float) – Min X
  • min_y (float) – Min Y
  • min_z (float) – Min Z
  • max_x (float) – Max X
  • max_y (float) – Max Y
  • max_z (float) – Max Z

New in version 5.1.6.

License: Geosoft Open License

Note: The Fill color is used to color the box.

change_line_message(line)

Change the specified line in a view.

Parameters:line (str) – Change to this line

New in version 5.0.

License: Geosoft Open License

Note: The line name can be created by calling LineLabel_DB using DB_LINE_LABEL_FORMAT_LINK. This insures that the label is created is the same way as used in the database.

chord(x, y, radius, ratio, angle, start, end)

Draw a filled arc.

Parameters:
  • x (float) – Center x
  • y (float) – Center y
  • radius (float) – Radius
  • ratio (float) – Ratio x/y
  • angle (float) – Angle
  • start (float) – Start angle
  • end (float) – End angle

New in version 5.0.

License: Geosoft Open License

classified_symbols(vv_x, vv_y, vv_z, scal_mm, zmin, zval, size, fcol)

Plot classified symbols

Parameters:
  • vv_x (GXVV) – X GXVV
  • vv_y (GXVV) – Y GXVV
  • vv_z (GXVV) – Data GXVV
  • scal_mm (float) – Scale factor to convert mm to view units
  • zmin (float) – Classified minimum Z to plot
  • zval (str) – Comma delimited list of Z maximums
  • size (str) – Comma delimited list of sizes in mm
  • fcol (str) – Comma delimited list of color strings

New in version 5.0.

License: Geosoft Open License

Note: For example, to plot three levels <95, 95-100 and 100-120, three string arguments would be:

“95,100,120” maximums of each class “2.0,2.5,3.0” sizes in mm “y,g,r” fill colors

clear_esrild_ts()

Clear ESRI local datum transformations currently in use.

New in version 7.1.

License: Geosoft Open License

clip_clear()

Remove/clear the view clip region.

New in version 5.0.

License: Geosoft Open License

clip_groups(mode)

Set the Clipping mode on/off for all groups.

Parameters:mode (int) – MVIEW_CLIP constants

New in version 5.0.

License: Geosoft Open License

clip_marked_groups(mode)

Set the Clipping mode on/off for marked groups.

Parameters:mode (int) – MVIEW_CLIP constants

New in version 5.0.

License: Geosoft Open License

clip_mode(mode)

Set the view clipping mode on or off.

Parameters:mode (int) – MVIEW_CLIP constants

New in version 5.0.

License: Geosoft Open License

Note: Entitles that follow in this group will be clipped or not clipped depending on this mode.

The montaj editor cannot change the clip mode of embedded clipped/unclipped enties that are controlled by this call. Use the Group clipping functions instead.

It is highly recommended that you use the group_clip_mode function to control clipping on a group-by-group basis, instead of using clip_mode when inside a group, as it is impossible to determine the true visible extents of a group. In such cases, the “zoom to full map extents” command may give incorrect results.

clip_poly(vv_x, vv_y, unit)

Add a polygon to the clip region.

Parameters:

New in version 5.0.

License: Geosoft Open License

Note: The polygon will be added to the current clip region. The GXVV‘s cannot have any dummy elements.

clip_poly_ex(vv_x, vv_y, unit, exclude)

Add a polygon to the clip region.

Parameters:

New in version 5.0.

License: Geosoft Open License

Note: The polygon will be added to the current clip region. The GXVV‘s cannot have any dummy elements.

clip_rect(min_x, min_y, max_x, max_y, unit)

Add a rectangle to the clip region.

Parameters:
  • min_x (float) – X minimum
  • min_y (float) – Y minimum
  • max_x (float) – X maximum
  • max_y (float) – Y maximum
  • unit (int) – MVIEW_UNIT constants

New in version 5.0.

License: Geosoft Open License

Note: The rectangle will be added to the current clip region.

clip_rect_ex(min_x, min_y, max_x, max_y, unit, exclude)

Add a rectangle to the clip region.

Parameters:
  • min_x (float) – X minimum
  • min_y (float) – Y minimum
  • max_x (float) – X maximum
  • max_y (float) – Y maximum
  • unit (int) – MVIEW_UNIT constants
  • exclude (int) – Exclude

New in version 5.0.

License: Geosoft Open License

Note: The rectangle will be added to the current clip region.

col_symbol(name, csymb)

Add a colored symbol object to a view.

Parameters:
  • name (str) – Name of the color symbol group
  • csymb (GXCSYMB) – GXCSYMB object

New in version 5.0.

License: Geosoft Open License

classmethod color(color)

Get a color from a color string label

Parameters:color (str) – Color name string
Returns:Color int
Return type:int

New in version 5.0.

License: Geosoft Open License

Note: Color strings may be “R”,”G”,”B”,”C”,”M”,”Y”, “H”,”S”,”V”, or “K” or a combination of these characters, each followed by up to three digits specifying a number between 0 and 255. An empty string produce C_ANY_NONE.

You must stay in the same color model, RGB, CMY, HSV or K.

For example “R”, “R127G22”, “H255S127V32”

Characters are not case sensitive.

See also

iColorXXX_MVIEW macros

classmethod color2_rgb(color, r, g, b)

Convert to RGB values.

Parameters:

New in version 6.3.

License: Geosoft Open License

Note: Color component intensities will be in the range 0-255.

See also

color

classmethod color_cmy(c, m, y)

Return CMY color.

Parameters:
  • c (int) – Cyan
  • m (int) – Magenta
  • y (int) – Yellow
Returns:

Color int based on color model.

Return type:

int

New in version 5.0.

License: Geosoft Open License

Note: Color component intensities must be in the range 0-255.

See also

color

classmethod color_descr(color, color_descr)

Convert a color to a color string label

Parameters:
  • color (int) – COL_ANY variable
  • color_descr (str_ref) – Color descriptor returned

New in version 5.0.

License: Geosoft Open License

Note: See color.

classmethod color_hsv(h, s, v)

Return HSV color.

Parameters:
  • h (int) – Hue
  • s (int) – Saturation
  • v (int) – Color
Returns:

Color int based on color model.

Return type:

int

New in version 5.0.

License: Geosoft Open License

Note: Color component intensities must be in the range 0-255.

See also

color

classmethod color_rgb(r, g, b)

Return RGB color.

Parameters:
  • r (int) – Red
  • g (int) – Green
  • b (int) – Blue
Returns:

Color int based on color model.

Return type:

int

New in version 5.0.

License: Geosoft Open License

Note: Color component intensities must be in the range 0-255.

See also

color

complex_polygon(vv_i, vv_x, vv_y)

Draw a polygon with holes in it.

Parameters:
  • vv_i (GXVV) – GXVV of type int holding the number of points for each polygon
  • vv_x (GXVV) – X coordinates.
  • vv_y (GXVV) – Y coordinates.

New in version 5.0.

License: Geosoft Open License

Note: You pass a GXVV with polygon sizes and 2 point vvs.

copy_marked_groups(mvie_wd)

Copies all marked groups from one view into another view

Parameters:mvie_wd (GXMVIEW) – Destination GXMVIEW

New in version 5.0.

License: Geosoft Open License

Note: Projections in source and destination views are used to copy the entities. Entities are clipped by the destination view’s clipping region.

copy_raw_marked_groups(mvie_wd)

Copies all marked groups raw from one view into another

Parameters:mvie_wd (GXMVIEW) – Destination GXMVIEW

New in version 5.1.2.

License: Geosoft Open License

Note: The projections, and clipping is completly ignored.

crc_group(name, crc)

Compute CRC for a group.

Parameters:
  • name (str) – Group name
  • crc (int) – CRC to start (use CRC_INIT_VALUE)
Return type:

int

New in version 5.0.

License: Geosoft Open License

crc_view(crc, file)

Generate an XML CRC of a View

Parameters:
  • crc (int_ref) – CRC returned
  • file (str) – Name of xml to generate (.zip added)

New in version 6.0.

License: Geosoft Open License

crc_view_group(group, crc, file)

Generate an XML CRC of a Group

Parameters:
  • group (str) – Name of Group
  • crc (int_ref) – CRC returned
  • file (str) – Name of xml to generate (.zip added)

New in version 6.0.

License: Geosoft Open License

classmethod create(map, name, mode)

Create GXMVIEW.

Parameters:
Returns:

GXMVIEW, aborts if creation fails

Return type:

GXMVIEW

New in version 5.0.

License: Geosoft Open License

Note: View scaling is set to mm on the map and the view origin is set to the map origin.

classmethod create_crooked_section(map, ipj, name, x0, y0, xs, ys, scale, v_ex, dist0, elev, v_vxs, v_vx, v_vy)

Creates a new crooked section view.

Parameters:
  • map (GXMAP) – GXMAP Object
  • ipj (GXIPJ) – Geographic projection of input X, Y locations below (without orientation)
  • name (str) – View Name
  • x0 (float) – Base view bottom left corner X (mm)
  • y0 (float) – Base view bottom left corner Y (mm)
  • xs (float) – Base view size in X (mm)
  • ys (float) – Base view size in Y (mm)
  • scale (float) – Map horizontal scale (X-axis)
  • v_ex (float) – Vertical exaggeration (1.0 is normal, must be >0.0)
  • dist0 (float) – Starting distance at the left side of the view.
  • elev (float) – Elevation at TOP of the view
  • v_vxs (GXVV) – Cumulative distances along the secton
  • v_vx (GXVV) – True X locations along the section
  • v_vy (GXVV) – True Y locations along the section
Returns:

GXMVIEW, aborts if creation fails

Return type:

GXMVIEW

New in version 7.2.

License: Geosoft Open License

Note: A crooked section is a section running vertically beneath a path of (X, Y) locations, like a river. This view supports linking to other plan, section, or 3D views. The data view coordinates are set up so that vertical coordinate corresponds to elevation, and the X coordinate is the distance along the crooked feature, beginning at zero on the left, but the status bar will show the true (X, Y, Z) location.

If the scale is set to rDUMMY, then it will be calculated so that the points will all fit horizontally.

classmethod create_crooked_section_data_profile(map, ipj, name, x0, y0, xs, ys, scale, dist0, min_z, max_z, log_z, v_vxs, v_vx, v_vy)

Creates a new crooked section data profile view.

Parameters:
  • map (GXMAP) – GXMAP Object
  • ipj (GXIPJ) – Geographic projection of input X, Y locations below (without orientation)
  • name (str) – View Name
  • x0 (float) – Base view bottom left corner X (mm)
  • y0 (float) – Base view bottom left corner Y (mm)
  • xs (float) – Base view size in X (mm)
  • ys (float) – Base view size in Y (mm)
  • scale (float) – Map horizontal scale (X-axis)
  • dist0 (float) – Starting distance at the left side of the view.
  • min_z (float) – Data value at bottom of the view
  • max_z (float) – Data value at top of the view
  • log_z (int) – Make logarithmic Y-axis (0:No, 1:Yes)?
  • v_vxs (GXVV) – Cumulative distances along the secton
  • v_vx (GXVV) – True X locations along the section
  • v_vy (GXVV) – True Y locations along the section
Returns:

GXMVIEW, aborts if creation fails

Return type:

GXMVIEW

New in version 7.2.

License: Geosoft Open License

Note: This is the same as create_crooked_section, except that the vertical axis plots a data value, not elevation, and allows for logarithmic scaling.

See Also: create_crooked_section.

create_plane(plane)

Create a 3D Plane for 2D Groups

Parameters:plane (str) – Name of Plane
Returns:x - Index of plane
Return type:int

New in version 5.1.2.

License: Geosoft Open License

cylinder_3d(start_x, start_y, start_z, end_x, end_y, end_z, start_radius, end_radius, flags)

Draw a 3D cylinder

Parameters:
  • start_x (float) – Start X
  • start_y (float) – Start Y
  • start_z (float) – Start Z
  • end_x (float) – End X
  • end_y (float) – End Y
  • end_z (float) – End Z
  • start_radius (float) – Start Radius (can be zero)
  • end_radius (float) – End Radius (can be zero)
  • flags (int) – MVIEW_CYLINDER3D constants

New in version 5.1.6.

License: Geosoft Open License

Note: The Fill color is used to color the cylinder. The flags determine if the cylinder is open and what end are closed. Note that you can create cones by specifying a 0 radius for one of the ends.

datalinkd(datalinkd, name)

Add a Data Link Display (GXDATALINKD) object to the view.

Parameters:name (str) – Name Maximum length is MVIEW_NAME_LENGTH

New in version 6.4.

License: Geosoft Open License

define_plane_3d(center_x, center_y, center_z, x_vector_x, x_vector_y, x_vector_z, y_vector_x, y_vector_y, y_vector_z)

Define a 2D drawing plane based on point and normal

Parameters:
  • center_x (float) – Center point X
  • center_y (float) – Center point Y
  • center_z (float) – Center point Z
  • x_vector_x (float) – X Vector X
  • x_vector_y (float) – X Vector Y
  • x_vector_z (float) – X Vector Z
  • y_vector_x (float) – Y Vector X
  • y_vector_y (float) – Y Vector Y
  • y_vector_z (float) – Y Vector Z

New in version 5.1.6.

License: Geosoft Open License

Note: 2D rendering commands are translated to 3D commands based on the plane.

define_viewer_axis_3d(center_x, center_y, center_z, dir_point_x, dir_point_y, dir_point_z)

Define a 2D drawing plane based on the user’s view that oriented around the vector.

Parameters:
  • center_x (float) – Center point X
  • center_y (float) – Center point Y
  • center_z (float) – Center point Z
  • dir_point_x (float) – Directional Point X
  • dir_point_y (float) – Directional Point Y
  • dir_point_z (float) – Directional Point Z

New in version 5.1.6.

License: Geosoft Open License

define_viewer_plane_3d(center_x, center_y, center_z)

Define a 2D drawing plane based on the user’s view.

Parameters:
  • center_x (float) – Center point X
  • center_y (float) – Center point Y
  • center_z (float) – Center point Z

New in version 5.1.6.

License: Geosoft Open License

Note: The plane is always facing the viewer. Otherwise the this is identical to the previous

del_marked_groups()

Delete marked groups.

New in version 5.0.

License: Geosoft Open License

delete_ext_clip_ply(ext_ply)

Deletes an extended clip GXPLY object used by this view.

Parameters:ext_ply (int) – Extended ClipPLY number

New in version 6.0.

License: Geosoft Open License

delete_group(group)

Delete a group.

Parameters:group (str) – Group name

New in version 5.1.8.

License: Geosoft Open License

Note: Does nothing if the group does not already exist.

delete_group_itr(group)

Deletes existing GXITR associated with a group.

Parameters:group (int) – Group number

New in version 9.3.

License: Geosoft Open License

Note: A group GXITR associate a color distribution with mixed vector groups (e.g. Drillhole Lithology tubes) groups. Used by legend UI support in 3D. Note that modifying this information does not currently change the group contents and a group needs to be regenerated (e.g. with maker) to refresh the objects.

delete_group_storage(group, storage_name)

Deletes existing generic storage associated with a group.

Parameters:
  • group (int) – Group number
  • storage_name (str) – Storage name

New in version 9.3.

License: Geosoft Open License

Note: External API users should not use storage names starting with “Geosoft”

delete_group_tpat(group)

Deletes existing GXTPAT associated with a group.

Parameters:group (int) – Group number

New in version 9.3.

License: Geosoft Open License

Note: A group GXTPAT associate a thematic color map with mixed vector groups (e.g. Drillhole Lithology tubes) groups. Used by legend UI support in 3D. Note that modifying this information does not currently change the group contents and a group needs to be regenerated (e.g. with maker) to refresh the objects.

delete_plane(plane, del_grp)

Delete a plane in a view

Parameters:
  • plane (int) – Plane number to delete
  • del_grp (int) – TRUE to delete all groups on the plane

New in version 5.1.2.

License: Geosoft Open License

Note: If the groups on the plane are not deleted, they will remain in the 3D view as “New” groups but will be unassigned to a plane. The SetAllNewGroupsToPlane function can be used to assign these groups to a different plane.

draw_object_3d(type, mode, objects, default_count, vert_v_vx, vert_v_vy, vert_v_vz, norm_v_vx, norm_v_vy, norm_v_vz, color_vv, index_vv, count_vv)

Draw a 3D object optimized for rendering

Parameters:
  • type (int) – MVIEW_DRAWOBJ3D_ENTITY constants
  • mode (int) – MVIEW_DRAWOBJ3D_MODE constants
  • objects (int) – Number of Objects
  • default_count (int) – Default Count (if variable and not specified)
  • vert_v_vx (GXVV) – Verticies X
  • vert_v_vy (GXVV) – Verticies Y
  • vert_v_vz (GXVV) – Verticies Z
  • norm_v_vx (GXVV) – Normals X (can be NULL)
  • norm_v_vy (GXVV) – Normals Y (can be NULL)
  • norm_v_vz (GXVV) – Normals Z (can be NULL)
  • color_vv (GXVV) – Colors GXVV (can be NULL)
  • index_vv (GXVV) – Index GXVV (can be NULL)
  • count_vv (GXVV) – Count GXVV (can be NULL)

New in version 6.2.

License: Geosoft Open License

draw_surface_3d_ex(group_name, vert_v_vx, vert_v_vy, vert_v_vz, norm_v_vx, norm_v_vy, norm_v_vz, color_vv, color, tri_vv_pt1, tri_vv_pt2, tri_vv_pt3, ipj)

Draw a 3D object built from triangles

Parameters:

New in version 7.0.

License: Geosoft Open License

Note: Provide one normal per vertex. Triangles are defined by indices into the set of vertices.

draw_surface_3d_from_file(group_name, surface_file)

Draw a 3D object from a surface file

Parameters:
  • group_name (str) – Group name
  • surface_file (str) – Surface file

New in version 7.0.

License: Geosoft Open License

draw_vector_voxel_vectors(vox, group, itr, scale_factor, height_base_ratio, max_base_size_ratio, cutoff_value, max_vectors)

Display vectors from a vector voxel in the view.

Parameters:
  • group (str) – View group name Maximum length is MVIEW_NAME_LENGTH
  • itr (GXITR) – Image transform - must contain zones
  • scale_factor (float) – Vector length scale factor - w.r.t. the voxel minimum horizontal cell size (default 1)
  • height_base_ratio (float) – Ratio of the vector cone height to its base (default 4)
  • max_base_size_ratio (float) – Ratio of maximum base size to minimum horizontal cell size (default 0.25)
  • cutoff_value (float) – Cutoff value - do not plot vectors with amplitudes less than this value (rDUMMY or 0 to plot all)
  • max_vectors (int) – Maximum number of vectors - decimate as required to reduce (iDUMMY to plot all)

New in version 7.6.

License: Geosoft Open License

Note: This will result in a GXVECTOR3D group object within the view

draw_vectors_3d(group, vv_x, vv_y, vv_z, vv_vx, vv_vy, vv_vz, itr, scale_for_max_vector, height_base_ratio, max_base_size_ratio)

Display vectors in the view.

Parameters:
  • group (str) – View group name Maximum length is MVIEW_NAME_LENGTH
  • vv_x (GXVV) – X locations
  • vv_y (GXVV) – Y locations
  • vv_z (GXVV) – Z locations
  • vv_vx (GXVV) – Vector X component
  • vv_vy (GXVV) – Vector Y component
  • vv_vz (GXVV) – Vector Z component
  • itr (GXITR) – Image transform - must contain zones
  • scale_for_max_vector (float) – Scale factor for the longest vector in map units / vector units. Vector lengths for the rest of the vectors scale by the square root of the vector amplitudes. This results in the apparent (viewed) area of the vector being proportional to the amplitude.
  • height_base_ratio (float) – Ratio of the vector cone height to its base (default 4)
  • max_base_size_ratio (float) – Maximum base size in view units. Leave blank (dummy) for no limit. If applied this can make larger vectors skinnier, but does not reduce the length, so they don’t obscure other vectors as much.

New in version 8.0.1.

License: Geosoft Open License

easy_maker(name, groups)

Used for GX makers which use both maps and databases.

Parameters:
  • name (str) – Maker name, used in menu prompt
  • groups (str) – INI groups (terminate each with a ”;”)

New in version 5.0.

License: Geosoft Open License

ellipse(x, y, radius, ratio, angle)

Draw an ellipse

Parameters:
  • x (float) – Center x
  • y (float) – Center y
  • radius (float) – Radius
  • ratio (float) – Ratio x/y
  • angle (float) – Angle

New in version 5.0.

License: Geosoft Open License

emf_object(min_x, min_y, max_x, max_y, file)

Add an EMF file data object to the view.

Parameters:
  • min_x (float) – Min X
  • min_y (float) – Min Y
  • max_x (float) – Max X
  • max_y (float) – Max Y
  • file (str) – EMF File holding data

New in version 6.4.

License: Geosoft Open License

exist_group(name)

Checks to see if a group exists.

Parameters:name (str) – Group name
Returns:0 - group does not exist. 1 - group exists.
Return type:int

New in version 5.0.

License: Geosoft Open License

ext_clip_ply_list(lst)

Get the names of existing extended clip GXPLY objects in this view as list.

New in version 6.0.

License: Geosoft Open License

extent(what, unit, min_x, min_y, max_x, max_y)

Get the view extents

Parameters:

New in version 5.0.

License: Geosoft Open License

Note: The CLIP region is the current view window or the limits of the current clip polygon.

If MVIEW_EXTENT_ALL is requested and the view has no groups, the clip extents are returned.

If clip extents are requested and there are no clip extents, an area 0.0,0.0 1.0,1.0 is returned.

The MVIEW_EXTENT_VISIBLE flag will return the union of the MVIEW_EXTENT_CLIP area and the extents of all non-masked visible groups in the view.

external_string_object(min_x, min_y, max_x, max_y, name, cl, data)

Add an external string data object to the view.

Parameters:
  • min_x (float) – Min X
  • min_y (float) – Min Y
  • max_x (float) – Max X
  • max_y (float) – Max Y
  • name (str) – Name of external object
  • cl (str) – Class of external object
  • data (str) – String data of external object

New in version 5.0.

License: Geosoft Open License

fill_color(color)

Set the fill color.

Parameters:color (int) – Color

New in version 5.0.

License: Geosoft Open License

find_group(group_name)

Find a Group by name.

Parameters:group_name (str) – Group name
Returns:Group Number.
Return type:int

New in version 7.2.

License: Geosoft Open License

find_group_by_guid(guid)

Find a Group by name.

Parameters:guid (str) – GUID
Returns:Group Number.
Return type:int

New in version 9.3.

License: Geosoft Open License

find_plane(plane)

Find a plane in a view

Parameters:plane (str) – Name of the plane
Returns:Plane number, -1 if not found
Return type:int

New in version 5.1.2.

License: Geosoft Open License

fit_map_window_3d(m_min_x, m_min_y, m_max_x, m_max_y, v_min_x, v_min_y, v_max_x, v_max_y)

Set the 2D view window for a 3D view.

Parameters:
  • m_min_x (float) – X minimum (mm) of the area in map relative to map origin
  • m_min_y (float) – Y minimum ..
  • m_max_x (float) – X maximum ..
  • m_max_y (float) – Y maximum ..
  • v_min_x (float) – Min X in ground coordinate to fit to the area defined above
  • v_min_y (float) – Min Y in ground coordinate ..
  • v_max_x (float) – Max X in ground coordinate ..
  • v_max_y (float) – Max Y in ground coordinate ..

New in version 5.1.2.

License: Geosoft Open License

Note: 3D views are placed in 2D maps within a 2D mapping window that is analgous to a 2D View. This allows all 2D functions (such as changing a view location and size) to treat a 3D view just like a 2D view.

The fit_map_window_3d function allows you to locate and set the “apparent” 2D mapping of a 3D view on the map. An intial map window is established as specified on the map, and the view scaling is established to fit the specified area within that map area.

fit_window(m_min_x, m_min_y, m_max_x, m_max_y, v_min_x, v_min_y, v_max_x, v_max_y)

Fit an area in ground coordinates to an area in mm on map.

Parameters:
  • m_min_x (float) – X minimum (mm) of the area in map relative to map origin
  • m_min_y (float) – Y minimum ..
  • m_max_x (float) – X maximum ..
  • m_max_y (float) – Y maximum ..
  • v_min_x (float) – Min X in ground coordinate to fit to the area defined above
  • v_min_y (float) – Min Y in ground coordinate ..
  • v_max_x (float) – Max X in ground coordinate ..
  • v_max_y (float) – Max Y in ground coordinate ..

New in version 5.0.

License: Geosoft Open License

Note: X and Y scales will be redefined and the units will be set to <unknown>. Coordinate ranges must be greater than 0.0.

See also

set_window

classmethod font_weight_lst(lst)

Fill a GXLST with the different font weights.

Parameters:lst (GXLST) – GXLST object

New in version 5.1.

License: Geosoft Open License

gen_new_group_name(group, new_name)

Generate the name of a group from a base name that is new. (always unique and won’t overwrite existing objects).

Parameters:
  • group (str) – Base Name of group
  • new_name (str_ref) – New Name of group

New in version 5.0.8.

License: Geosoft Open License

get_3d_group_flags(group_num)

Get a 3D geometry group’s 3D rendering flags.

Parameters:group_num (int) – Group number
Returns:Combination of MVIEW_3D_RENDER constants flags or 0
Return type:int

New in version 9.1.

License: Geosoft Open License

get_3d_point_of_view(x, y, z, distance, declination, inclination)

Get 3D point of view (values are will be rDUMMY if view for 2D views)

Parameters:

New in version 9.2.

License: Geosoft Open License

get_agg_file_names(group, vv)

Get the names of grid files stored in an GXAGG.

Parameters:
  • group (str) – Group name
  • vv (GXVV) – Returned string GXVV of type -STR_FILE

New in version 5.1.5.

License: Geosoft Open License

Note: The group must be an GXAGG group. Check this using is_group and MVIEW_IS_AGG.

get_aggregate(group)

Get an existing Aggregate object from the view.

Parameters:group (int) – Group number
Returns:GXAGG object
Return type:GXAGG

New in version 9.2.

License: Geosoft Open License

Note: This method returns a cached object owned by the GXMVIEW and will be destroyed automatically when the GXMVIEW is disposed

get_class_name(cl, name)

Get a class name.

Parameters:
  • cl (str) – Class
  • name (str_ref) – Name

New in version 5.1.2.

License: Geosoft Open License

Note: GXMVIEW class names are intended to be used to record the names of certain classes in the view, such as “Plane” for the default drawing plane.

get_clip_ply(poly)

Get clipping polygons, in the user projection

Parameters:poly (GXPLY) – Poly

New in version 5.0.

License: Geosoft Open License

Note: The returned GXPLY is recast into the User projection. For oriented views (especially sections), use get_ply, which returns the Clip GXPLY in the view’s native projection (e.g. the one set using set_ipj).

get_col_symbol(group)

Get an existing colored symbol object from the view.

Parameters:group (int) – Group number
Returns:GXCSYMB object
Return type:GXCSYMB

New in version 9.2.

License: Geosoft Open License

Note: This method returns a cached object owned by the GXMVIEW and will be destroyed automatically when the GXMVIEW is disposed

get_datalinkd(group)

Get an existing Data Link Display (GXDATALINKD) object from the view.

Parameters:group (int) – Group number
Returns:GXDATALINKD object
Return type:GXDATALINKD

New in version 9.2.

License: Geosoft Open License

Note: This method returns a cached object owned by the GXMVIEW and will be destroyed automatically when the GXMVIEW is disposed

get_def_plane(name)

Get the default drawing plane.

Parameters:name (str_ref) – Name

New in version 5.1.2.

License: Geosoft Open License

Note: 2D drawing to a 3D View will always be placed on the default drawing plane. If no default drawing plane has been set, the first valid plane in the view is used as the default drawing plane.

get_ext_clip_ply(ext_ply, ply)

Get an extended clip GXPLY object used by this view.

Parameters:
  • ext_ply (int) – Extended ClipPLY number
  • ply (GXPLY) – GXPLY object to get

New in version 6.0.

License: Geosoft Open License

get_group_ext_clip_ply(group, ext_ply)

Gets extended clip information for group in view.

Parameters:
  • group (str) – Group Name
  • ext_ply (int_ref) – Extended GXPLY number (returned, -1 if not set)

New in version 6.0.

License: Geosoft Open License

get_group_extent(group_name, xmin, ymin, xmax, ymax, unit)

Get extent of a group in a view

Parameters:

New in version 5.0.

License: Geosoft Open License

get_group_freeze_scale(group_num, scale)

Get a scale freezing value for the group (rDUMMY for disabled).

Parameters:
  • group_num (int) – Group number
  • scale (float_ref) – Variable to fill with freeze scale

New in version 7.2.

License: Geosoft Open License

get_group_guid(group, guid)

Gets a GUID of a group in the GXMVIEW.

Parameters:
  • group (int) – Group number
  • guid (str_ref) – GUID

New in version 9.3.

License: Geosoft Open License

Note: If a GUID was never queried a new one will be assigned and the map will be modified. Only if the map is saved will this value then persist.

get_group_itr(group)

Get group GXITR

Parameters:group (int) – Group number
Return type:GXITR

New in version 9.3.

License: Geosoft Open License

Note: A group GXITR associate a color distribution with mixed vector groups (e.g. Drillhole Lithology tubes) groups. Used by legend UI support in 3D. Note that modifying this information does not currently change the group contents and a group needs to be regenerated (e.g. with maker) to refresh the objects.

get_group_tpat(group)

Get group GXTPAT

Parameters:group (int) – Group number
Return type:GXTPAT

New in version 9.3.

License: Geosoft Open License

Note: A group GXTPAT associate a thematic color map with mixed vector groups (e.g. Drillhole Lithology tubes) groups. Used by legend UI support in 3D. Note that modifying this information does not currently change the group contents and a group needs to be regenerated (e.g. with maker) to refresh the objects.

get_group_transparency(group_name, trans)

Gets the transparency value of group

Parameters:
  • group_name (str) – Group name
  • trans (float_ref) – Transparency (1.0 - Opaque, 0.0 - Transparent)

New in version 6.0.

License: Geosoft Open License

get_guid(guid)

Gets the GUID of the GXMVIEW.

Parameters:guid (str_ref) – GUID

New in version 9.3.

License: Geosoft Open License

Note: If a GUID was never queried a new one will be assigned and the map will be modified. Only if the map is saved will this value then persist.

get_ipj(ipj)

Get the projection of the view.

Parameters:ipj (GXIPJ) – GXIPJ in which to place the view GXIPJ

New in version 5.0.

License: Geosoft Open License

get_map()

Get the GXMAP of the view.

Returns:The GXMAP of the View.
Return type:GXMAP

New in version 7.2.

License: Geosoft Open License

get_map_scale()

Get the current map scale of the view

Returns:The current map scale to 6 significant digits
Return type:float

New in version 5.0.

License: Geosoft Open License

get_meta(group, meta)

Retrieves Metadata from a group

Parameters:
  • group (str) – Group Name
  • meta (str_ref) – Meta name
Returns:

GXMETA Object

Return type:

GXMETA

New in version 5.1.6.

License: Geosoft Open License

get_name(name)

Gets the name of a view.

Parameters:name (str_ref) – View name returned

New in version 5.0.

License: Geosoft Open License

get_name_ext_clip_ply(ext_ply, name)

Get the name of the extended clip GXPLY object in this view.

Parameters:
  • ext_ply (int) – Extended ClipPLY number
  • name (str_ref) – Name

New in version 6.0.

License: Geosoft Open License

get_plane_clip_ply(plane, pply)

Get the Plane Clip Region

Parameters:
  • plane (int) – Plane index
  • pply (GXPLY) – Clip Region

New in version 6.0.

License: Geosoft Open License

Note: By default it is the View’s Clip Region

get_plane_equation(plane, pitch, yaw, roll, x, y, z, sx, sy, str_val)

Get the equation of a plane

Parameters:
  • plane (int) – Plane index
  • pitch (float_ref) – Rotation about X (Y toward Z +ve, between -360 and 360)
  • yaw (float_ref) – Rotation about Y (Z toward X +ve, between -360 and 360)
  • roll (float_ref) – Rotation about Z (Y toward X +ve, between -360 and 360)
  • x (float_ref) – X offset of plane
  • y (float_ref) – Y offset of plane
  • z (float_ref) – Z offset of plane
  • sx (float_ref) – X scale
  • sy (float_ref) – Y scale
  • str_val (float_ref) – Z scale

New in version 5.1.2.

License: Geosoft Open License

get_ply(poly)

Get clipping polygons, in the base projection

Parameters:poly (GXPLY) – Poly

New in version 6.0.

License: Geosoft Open License

Note: This should be used to get the clipping polygon for oriented views (especially sections).

get_reg()

Get the GXREG of the view.

Returns:The GXREG of the View.
Return type:GXREG

New in version 5.0.5.

License: Geosoft Open License

get_user_ipj(ipj)

Get the user projection of the view.

Parameters:ipj (GXIPJ) – GXIPJ in which to place the view GXIPJ

New in version 5.0.

License: Geosoft Open License

get_vector_3d(group)

Get an existing GXVECTOR3D object from the view.

Parameters:group (int) – Group number
Returns:GXVECTOR3D object
Return type:GXVECTOR3D

New in version 9.3.

License: Geosoft Open License

Note: This method returns a cached object owned by the GXMVIEW and will be destroyed automatically when the GXMVIEW is disposed

get_view_plane_equation(pitch, yaw, roll, x, y, z, sx, sy, str_val)

Get the View’s Plane Equation

Parameters:

New in version 5.1.2.

License: Geosoft Open License

get_voxd(group)

Get an existing GXVOXD object from the view.

Parameters:group (int) – Group number
Returns:GXVOXD object
Return type:GXVOXD

New in version 8.2.

License: Geosoft Open License

Note: This method returns a cached object owned by the GXMVIEW and will be destroyed automatically when the GXMVIEW is disposed

grid(x_inc, y_inc, dx, dy, grid_type)

Draw a grid in the current window

Parameters:
  • x_inc (float) – X grid increment
  • y_inc (float) – Y grid increment
  • dx (float) – dX dot increment/cross X size
  • dy (float) – dY dot increment/cross Y size
  • grid_type (int) – MVIEW_GRID constants

New in version 5.0.

License: Geosoft Open License

Note: The grid will be drawn in the current window specified by the last SetWindow call.

group_clip_mode(mode)

Set the Clipping mode on or off for new groups.

Parameters:mode (int) – MVIEW_CLIP constants

New in version 5.0.

License: Geosoft Open License

Note: All new groups will be clipped.

group_itr_exists(group)

Determine if group GXITR exists.

Parameters:group (int) – Group number
Returns:1 - GXITR exists, 0 - GXITR does not exist
Return type:int

New in version 9.3.

License: Geosoft Open License

Note: A group GXITR associate a color distribution with mixed vector groups (e.g. Drillhole Lithology tubes) groups. Used by legend UI support in 3D. Note that modifying this information does not currently change the group contents and a group needs to be regenerated (e.g. with maker) to refresh the objects.

group_name(group_num, group_name)

Get a group name

Parameters:
  • group_num (int) – Group number, error if not valid
  • group_name (str_ref) – Group Name

New in version 7.2.

License: Geosoft Open License

group_storage_exists(group, storage_name)

Determine if generic storage associated with a group exists.

Parameters:
  • group (int) – Group number
  • storage_name (str) – Storage name
Returns:

1 - storage exists, 0 - storage does not exist

Return type:

int

New in version 9.3.

License: Geosoft Open License

Note: External API users should not use storage names starting with “Geosoft”

group_to_ply(name, pply)

Save all polygons in group into GXPLY obj.

Parameters:
  • name (str) – Group name
  • pply (GXPLY) – GXPLY to add to

New in version 5.0.

License: Geosoft Open License

Note: The coordinates will be in the working coordinate system of the view. The SetWorkingIPJ_MVIEW method can be used to change the working coordinate system. This function will return an empty GXPLY if the group is hidden.

group_tpat_exists(group)

Determine if group GXTPAT exists.

Parameters:group (int) – Group number
Returns:1 - GXTPAT exists, 0 - GXTPAT does not exist
Return type:int

New in version 9.3.

License: Geosoft Open License

Note: A group GXTPAT associate a thematic color map with mixed vector groups (e.g. Drillhole Lithology tubes) groups. Used by legend UI support in 3D. Note that modifying this information does not currently change the group contents and a group needs to be regenerated (e.g. with maker) to refresh the objects.

hide_marked_groups(mode)

Hide/Show marked groups.

Parameters:mode (int) – MVIEW_HIDE constants

New in version 5.0.

License: Geosoft Open License

hide_shadow_2d_interpretations(mode)

Hide/Show 2d shadow interpretations.

Parameters:mode (int) – MVIEW_HIDE constants

New in version 8.5.

License: Geosoft Open License

is_group(group, what)

Query a status or characteristic of a group

Parameters:
Returns:

TRUE or FALSE (1 or 0)

Return type:

int

New in version 5.0.5.

License: Geosoft Open License

is_group_empty(group)

Is the group empty?

Parameters:group (str) – Group name
Returns:TRUE or FALSE (1 or 0)
Return type:int

New in version 6.3.

License: Geosoft Open License

is_movable()

Is this view movable?

Return type:bool

New in version 6.4.

License: Geosoft Open License

Note: Views are always physically movable in the API, this flag is for preventing accidental moving in the GXGUI. By default views are not movable.

is_null()

Check if this is a null (undefined) instance

Returns:True if this is a null (undefined) instance, False otherwise.
Return type:bool
is_projection_empty()

Returns 1 if the view projection and view user projection are both empty (undefined).

Returns:1 if the view projection and view user projection are both empty.
Return type:int

New in version 9.0.

License: Geosoft Open License

Note: Use, for instance, to see if the map view contains projection information. The first time you add data that has projection information you should set up an empty view projection so that subsequent data added with a different projection is properly displayed in relation to the initial data.

is_section()

Is the view a section view?

Returns:TRUE if view is a section view.
Return type:int

New in version 8.2.

License: Geosoft Open License

Note: Section views are recognized because their projection contains one of the following orientations:

IPJ_ORIENT_SECTION - Target-type sections with Z projection horizontally IPJ_ORIENT_SECTION_NORMAL - Like IPJ_ORIENT_SECTION, but Z projects perpendicular to the secton plane. IPJ_ORIENT_SECTION_CROOKED - Crooked sections IPJ_ORIENT_3D - Some Sections extracted from a voxel - e.g. VoxelToGrids, as the voxel can have any orientation in 3D.

is_view_3d()

Is the view 3D?

Returns:TRUE if view is 3D
Return type:int

New in version 5.1.2.

License: Geosoft Open License

is_visible()

Is this view visible?

Return type:bool

New in version 6.3.

License: Geosoft Open License

label_fid(vv_x, fid_start, fid_incr, interval, y_loc, y_scale)

Label fiducials on a profile

Parameters:
  • vv_x (GXVV) – X GXVV
  • fid_start (float) – Fiducial start
  • fid_incr (float) – Fiducial increment
  • interval (float) – Fiducial label interval, default 100.0
  • y_loc (float) – Y location in view unit
  • y_scale (float) – Y scale

New in version 5.0.

License: Geosoft Open License

Note: A 1mm long vertical tick is drawn at the place where a label is present. The label is drawn below the tick.

The incoming X GXVV is used to define the place for label.

label_x(l_loc, left, right, lable_int, just, bound, orient)

Label annotations on the X axis

Parameters:

New in version 5.0.

License: Geosoft Open License

Note: Label bounding will justify edge labels to be inside the bar limits. But bounding does not apply if labels are drawn vertically (top right or top left)

label_y(x, bottom, top, lable_int, just, bound, orient)

Label annotations on the Y axis

Parameters:

New in version 5.0.

License: Geosoft Open License

Note: Label bounding will justify edge labels to be inside the bar limits. But bounding does not apply if labels are drawn vertically (top right or top left)

line(x0, y0, x1, y1)

Draw a line.

Parameters:
  • x0 (float) – X0
  • y0 (float) – Y0
  • x1 (float) – X1
  • y1 (float) – Y1

New in version 5.0.

License: Geosoft Open License

line_color(color)

Set the line color.

Parameters:color (int) – Color

New in version 5.0.

License: Geosoft Open License

line_smooth(smooth)

Set the line edge smoothing.

Parameters:smooth (int) – MVIEW_SMOOTH constants

New in version 6.3.

License: Geosoft Open License

line_style(style, pitch)

Set the style of a line.

Parameters:
  • style (int) – Line Style #, see default.lpt
  • pitch (float) – Pitch in view units

New in version 5.0.

License: Geosoft Open License

Note: Line styles are selected by ordinal value (line style #) from those defined in default.lpt. If default.lpt does not have a the style specified, the file user.lpt is searched. If this file does not contain the line style solid is assumed.

Note that line styles from default.lpt and user.lpt are read into the map at the time the map is created, not at display time.

line_thick(thick)

Set the line thickness.

Parameters:thick (float) – Line thickness in view space units

New in version 5.0.

License: Geosoft Open License

line_vv(gvv)

Draw line segments stored in a GS_D2LINE GXVV.

Parameters:gvv (GXVV) – GXVV for GS_D2LINE

New in version 5.0.

License: Geosoft Open License

Make a link to a database.

Parameters:
  • db (GXDB) – Database handle
  • name (str) – Link name

New in version 5.0.

License: Geosoft Open License

list_groups(lst, flag)

Get a list of the groups in a view.

Parameters:
Returns:

Number of groups in the list

Return type:

int

New in version 5.0.

License: Geosoft Open License

list_plane_groups(plane, lst)

List all groups in a specific plane of a 3D view

Parameters:
  • plane (int) – Plane number
  • lst (GXLST) – List of plane names and numbers

New in version 5.1.2.

License: Geosoft Open License

Note: The group names are placed in the list names, group numbers are placed in the list values.

Groups are added to the end of the GXLST.

list_planes(lst)

List all planes in a 3D view

Parameters:lst (GXLST) – List of plane names and numbers

New in version 5.1.2.

License: Geosoft Open License

Note: The plane names are placed in the list names, plane numbers are placed in the list values.

Planes are added to the end of the GXLST.

maker(db, map, prog, type, name, groups)

Generates a Maker for the database and/or map.

Parameters:
  • db (int) – Database required? (0 = No, 1 = Yes)
  • map (int) – Map required? (0 = No, 1 = Yes)
  • prog (str) – Program name
  • type (int) – MAKER constants
  • name (str) – Maker name, used in menu prompt
  • groups (str) – INI groups (terminate each with a ”;”)

New in version 5.0.

License: Geosoft Open License

map_origin(x_origin, y_origin)

Get the map origin from a view

Parameters:
  • x_origin (float_ref) – Returned map origin - X
  • y_origin (float_ref) – Returned map origin - Y

New in version 5.0.

License: Geosoft Open License

mark_all_groups(mark)

Mark or unmark all groups.

Parameters:mark (int) – 0 - unmark, 1 - mark

New in version 5.0.

License: Geosoft Open License

mark_empty_groups(mark)

Mark/unmark all empty groups.

Parameters:mark (int) – 0 - unmark, 1 - mark

New in version 6.3.

License: Geosoft Open License

mark_group(name, mark)

Mark or unmark a specific group

Parameters:
  • name (str) – Group name
  • mark (int) – 0 - unmark, 1 - mark

New in version 5.0.

License: Geosoft Open License

measure_text(text, x_min, y_min, x_max, y_max)

Compute the bounding rectangle in view units of the text using the current attributes.

Parameters:

New in version 6.0.

License: Geosoft Open License

Note: Area will be 0 if error occurred (does not fail). This will return the bounding rectangle as if the text was placed at 0,0 and adjusted according to the current text alignment and angle set for the view. Also see notes for text_size.

meta(meta, name)

Store Metadata in a group

Parameters:
  • meta (GXMETA) – GXMETA object
  • name (str) – Menu name of Object

New in version 5.1.3.

License: Geosoft Open License

mode_pj(mode)

Set the working projection mode

Parameters:mode (int) – MVIEW_PJ constants

New in version 5.0.

License: Geosoft Open License

Note: This controls how your coordinates and attributes will be interpreted. A working projection must be set useing SetWorkingIPJ_MVIEW for this method to have any effect.

See also

SetWorkingIPJ

move_group_backward(group)

Move the group backward one position (render sooner).

Parameters:group (str) – Group name

New in version 5.1.1.

License: Geosoft Open License

move_group_forward(group)

Move the group forward one position (render later).

Parameters:group (str) – Group name

New in version 5.1.1.

License: Geosoft Open License

move_group_to_back(group)

Move the group to the back (render first).

Parameters:group (str) – Group name

New in version 5.1.1.

License: Geosoft Open License

move_group_to_front(group)

Move the group to the front (render last).

Parameters:group (str) – Group name

New in version 5.1.1.

License: Geosoft Open License

north()

Returns North direction at center of view.

Returns:North direction id deg. azimuth relative to view Y.
Return type:float

New in version 5.0.

License: Geosoft Open License

Note: North is calculated from the GXIPJ North direction. It will be rDUMMY if GXIPJ is unknown.

classmethod null()

A null (undefined) instance of GXMVIEW

Returns:A null GXMVIEW
Return type:GXMVIEW
num_ext_clip_ply()

Get the number of extended clip GXPLY objects in this view.

Returns:Number of PLYs
Return type:int

New in version 6.0.

License: Geosoft Open License

classmethod optimum_tick(min, max, sep)

Return a default optimum tick interval

Parameters:
  • min (float) – Minimum of range
  • max (float) – Maximum
  • sep (float_ref) – Optimum interval

New in version 5.0.

License: Geosoft Open License

pat_angle(angle)

Sets the pattern angle

Parameters:angle (float) – Angle

New in version 5.0.

License: Geosoft Open License

Note: Allows the user to apply a rotation to the basic pattern. Care should be taken to ensure that the tiling remains continuous; i.e. if the pattern consists of horizontal lines, only angles of -90, 0, 90, 180 (etc.) would give seamless tiling. However, simple, closed figure, such as a star, could be given any angle. Rotations about the center point (0.5, 0.5) of the unit cell are performed prior to applying PatSize. The default value is 0.0. Setting an angle of -999 inititates the random angle feature, and each pattern tile is rotated to a different angle. Using this along with PatStyle(View, MVIEW_TILE_RANDOM) can give a “hand-drawn” effect to geological fills.

See the IMPORTANT note for sPatNumber_MVIEW().

pat_density(density)

Sets the tiling density.

Parameters:density (float) – Relative density (default = 1).

New in version 5.0.

License: Geosoft Open License

Note: This number is the ratio between the plotted unit cell size and the distance between the plotted tile centers. The default value is 1. A value larger than 1 increases the density of the pattern, while values less than 1 make the pattern more “spread out”. This can be used along with sPatStyleMethod to create more complicated fills from simple patterns.

See the IMPORTANT note for sPatNumber_MVIEW().

pat_number(number)

Sets the pattern number

Parameters:number (int) – Pattern number

New in version 5.0.

License: Geosoft Open License

Note: Pattern 0 is solid fill.(default) Set the pattern color using fill_color.

Patterns are selected by ordinal value (pattern number) from those defined in default.pat. If default.pat does not have a the pattern specified, the file user.pat is searched. If this file does not contain the pattern solid is assumed.

Note that patterns from default.pat and user.pat are read into the map at the time the map is created, not at display time.

IMPORTANT: A call to this function resets all the various pattern attributes to those defined for the selected pattern. If you want to modify any attributes, call that function (e.g. sPatSize_MVIEW(), AFTER you call sPatNumber_MVIEW().

pat_size(size)

Sets the pattern unit cell size (X)

Parameters:size (float) – Pattern size in view units

New in version 5.0.

License: Geosoft Open License

Note: See the IMPORTANT note for sPatNumber_MVIEW().

pat_style(style)

Sets the tiling method (i.e. rectangle, triangle)

Parameters:style (int) – MVIEW_TILE constants

New in version 5.0.

License: Geosoft Open License

Note: Normally, the unit cell is duplicated across the fill area like floor tiles (MVIEW_TILE_RECTANGULAR). DIAGONAL tiling rotates the tiling positions (but not the tiles) by 45 degrees. TRIANGULAR tiling Offsets each succeeding row by half the unit cell size, and lessens the vertical offset, so that the unit cell centers form a triangular grid pattern. RANDOM tiling adds small random offsets in both directions to give the diffuse effect seen on many geological maps.

NOTE: Some patterns are designed to be interlocking and may only work “correctly” with one tiling method.

See the IMPORTANT note for sPatNumber_MVIEW().

pat_thick(thick)

Sets the pattern line thickness

Parameters:thick (float) – Line thickness as fraction of pattern size (ie. 0.05)

New in version 5.0.

License: Geosoft Open License

Note: See the IMPORTANT note for sPatNumber_MVIEW().

plot_to_view(x, y)

Convert a plot coordinate in mm to a VIEW coordinate.

Parameters:
  • x (float_ref) – X in plot mm, returned in View coordinates
  • y (float_ref) – Y in plot mm, returned in View coordinates

New in version 5.0.

License: Geosoft Open License

point_3d(x, y, z)

Draw a 3D point.

Parameters:
  • x (float) – X
  • y (float) – Y
  • z (float) – Z

New in version 5.1.6.

License: Geosoft Open License

Note: The Line color and line thickness will affect rendering.

poly_line(type, vv_x, vv_y)

Draw a polyline or polygon (dummies deleted).

Parameters:

New in version 5.0.

License: Geosoft Open License

Note: Dummies in X and/or Y GXVV are deleted and it results in ‘solid’ line. Using poly_line_dm (below) function if gaps from dummies are to be kept.

poly_line_3d(vv_x, vv_y, vv_z)

Draw a 3D polyline.

Parameters:
  • vv_x (GXVV) – X coordinates.
  • vv_y (GXVV) – Y coordinates.
  • vv_z (GXVV) – Z coordinates.

New in version 5.1.6.

License: Geosoft Open License

Note: Dummies are not allowed in the line. Line Color, Thickness is supported on rendering

poly_line_dm(vv_x, vv_y)

Draw a polyline with gaps defined by dummies in X/Y VVs

Parameters:
  • vv_x (GXVV) – X coordinates.
  • vv_y (GXVV) – Y coordinates.

New in version 5.0.

License: Geosoft Open License

poly_wrap(vv_x, vv_y)

Draw wrapped polylines from X and Y GXVV‘s.

Parameters:
  • vv_x (GXVV) – X coordinates.
  • vv_y (GXVV) – Y coordinates.

New in version 5.0.

License: Geosoft Open License

Note: Convert a given VVy into a wrapped VVy using the current view window as the wrap region. Then draw polylines from it.

See also

poly_line

polygon_dm(vv_x, vv_y)

Like PolyLineDm, but draw polygons.

Parameters:
  • vv_x (GXVV) – X coordinates.
  • vv_y (GXVV) – Y coordinates.

New in version 5.0.6.

License: Geosoft Open License

polygon_ply(ply)

Draw a complex polygon from GXPLY.

New in version 5.1.

License: Geosoft Open License

re_scale(scale)

Change the scale of a view.

Parameters:scale (float) – Scale factor (> 0.0)

New in version 5.0.

License: Geosoft Open License

Note: The view size is multiplied by the scale factor. The view location will move relative to the map origin by the scale factor.

read_group_storage(group, storage_name)

Reads existing generic storage associated with a group into an in-memory GXBF.

Parameters:
  • group (int) – Group number
  • storage_name (str) – Storage name
Returns:

GXBF Object

Return type:

GXBF

New in version 9.3.

License: Geosoft Open License

Note: External API users should not use storage names starting with “Geosoft”

rectangle(x0, y0, x1, y1)

Draw a rectangle.

Parameters:
  • x0 (float) – X0
  • y0 (float) – Y0
  • x1 (float) – X1
  • y1 (float) – Y1

New in version 5.0.

License: Geosoft Open License

relocate_group(group, min_x, min_y, max_x, max_y, asp)

Re-locate a group in a view.

Parameters:
  • group (str) – Group name
  • min_x (float) – Area X minimum
  • min_y (float) – Area Y minimum
  • max_x (float) – Area X maximum
  • max_y (float) – Area Y maximum
  • asp (int) – MVIEW_RELOCATE constants

New in version 5.0.

License: Geosoft Open License

rename_group(old, new)

Rename a group.

Parameters:
  • old (str) – Old group name
  • new (str) – New group name

New in version 5.1.1.

License: Geosoft Open License

Note: Does nothing if the group does not already exist.

render(hdc, left, bottom, right, top, min_x, min_y, max_x, max_y)

Render a specified area of view onto a Windows DC handle

Parameters:
  • hdc (int) – DC Handle
  • left (int) – Left value of the render rect in Windows coordinates (bottom>top)
  • bottom (int) – Bottom value
  • right (int) – Right value
  • top (int) – Top value
  • min_x (float) – Area X minimum
  • min_y (float) – Area Y minimum
  • max_x (float) – Area X maximum
  • max_y (float) – Area Y maximum

New in version 6.4.

License: Geosoft Open License

render_order()

Query the view render order

Returns:Render order
Return type:int

New in version 6.3.

License: Geosoft Open License

Note: Views with lower numbers should render first, iDUMMY is undefined

scale_all_group(xs, ys)

Scale all groups (except for GRID) in a view

Parameters:
  • xs (float) – X scale
  • ys (float) – Y scale

New in version 5.0.

License: Geosoft Open License

Note: X (and Y) scale is the ratio of the new dimension over the old dimension of a reference object. For example, if a horizontal straight line of 10m long becomes 20m, X scale should be 2.

The view is then scaled back so that the view occupies the same area size as before. The view’s clip area is updated as well.

scale_mm()

Get the horizontal scale in view X units/mm

Returns:Returns horizontal scale in view X units/mm
Return type:float

New in version 5.0.

License: Geosoft Open License

Note: The scale factor is intended to be used by methods that would like to specify sizes in mm. Examples would be text sizes, line thicknesses and line pitch.

scale_pj_mm()

Get horizontal scale in projected user units/mm

Returns:Returns horizontal scale in projected user units/mm
Return type:float

New in version 5.0.

License: Geosoft Open License

Note: The scale factor is intended to be used by methods that would like to specify sizes in mm. Examples would be text sizes, line thicknesses and line pitch. Same as rScaleMM if working projection not defined

scale_window(min_x, min_y, max_x, max_y, bot_x, bot_y, x_scal, y_scal)

Assign view coordinates to define a window.

Parameters:
  • min_x (float) – X minimum in view coordinates
  • min_y (float) – Y minimum
  • max_x (float) – X maximum
  • max_y (float) – Y maximum
  • bot_x (float) – X minimum in plot coordinates
  • bot_y (float) – Y minimum
  • x_scal (float) – Horizontal scale (view unit/plot unit in mm)
  • y_scal (float) – Vertical scale

New in version 5.0.

License: Geosoft Open License

Note: The provided coordinates are converted to map mm using the current view translation and scaling. SetWindow is effectively called.

scale_ymm()

Get the vertical scale in Y units/mm

Returns:Returns vertical scale in view Y units/mm
Return type:float

New in version 5.0.

License: Geosoft Open License

Note: The scale factor is intended to be used by methods that would like to specify sizes in mm. Examples would be text sizes, line thicknesses and line pitch.

segment(x, y, radius, ratio, angle, start, end)

Draw a filled segment of an ellipse.

Parameters:
  • x (float) – Center x
  • y (float) – Center y
  • radius (float) – Radius
  • ratio (float) – Ratio x/y
  • angle (float) – Angle
  • start (float) – Start angle
  • end (float) – End angle

New in version 5.0.7.

License: Geosoft Open License

set_3d_group_flags(group_num, flags)

Set a 3D geometry group’s 3D rendering flags.

Parameters:

New in version 9.1.

License: Geosoft Open License

set_3d_point_of_view(x, y, z, distance, declination, inclination)

Set 3D point of view (no effect on 2D views)

Parameters:
  • x (float) – X center
  • y (float) – Y center
  • z (float) – Z center
  • distance (float) – Distance from center
  • declination (float) – Declination, 0 to 360 CW from Y
  • inclination (float) – Inclination, -90 to +90

New in version 9.2.

License: Geosoft Open License

set_3dn(o3dn)

Set the GX3DN object for this view

Parameters:o3dn (GX3DN) – GX3DN to set (NULL for 2D view)

New in version 5.1.2.

License: Geosoft Open License

Note: To make the view a 2D view, set a GX3DN of NULL.

set_all_groups_to_plane(plane)

Set all groups to be within one plane

Parameters:plane (int) – Plane Index to set all groups to

New in version 5.1.2.

License: Geosoft Open License

set_all_new_groups_to_plane(plane)

Set all groups that are not in any plane to this plane

Parameters:plane (int) – Plane Index to set all groups to

New in version 5.1.2.

License: Geosoft Open License

set_class_name(cl, name)

Set a class name.

Parameters:
  • cl (str) – Class
  • name (str) – Name

New in version 5.1.2.

License: Geosoft Open License

Note: GXMVIEW class names are intended to be used to record the names of certain classes in the view, such as “Plane” for the default drawing plane.

set_clip_ply(poly)

Set clipping region to a GXPLY

Parameters:poly (GXPLY) – Poly

New in version 5.0.

License: Geosoft Open License

set_def_plane(name)

Set the default drawing plane.

Parameters:name (str) – Name

New in version 5.1.2.

License: Geosoft Open License

Note: 2D drawing to a 3D View will always be placed on the default drawing plane. If no default drawing plane has been set, the first valid plane in the view is used as the default drawing plane.

set_ext_clip_ply(ext_ply, name, ply)

Set an extended clip GXPLY object used by this view.

Parameters:
  • ext_ply (int) – Extended ClipPLY number, If greater or equal to the return value of num_ext_clip_ply it will be added to the end of the current list
  • name (str) – Name (Has to be unique, otherwise error will be returned)
  • ply (GXPLY) – GXPLY object to set, use a null GXPLY to rename an existing object
Returns:

Index of new or changed GXPLY, -1 on error

Return type:

int

New in version 6.0.

License: Geosoft Open License

set_freeze_scale(scale)

Set a scale freezing value into stream (rDUMMY for disabled).

Parameters:scale (float) – Freeze Scale value

New in version 7.2.

License: Geosoft Open License

Note: Objects written after this will override any scale freezing set for the group

set_group_ext_clip_ply(group, ext_ply)

Sets extended clip information for group in view.

Parameters:
  • group (str) – Group Name
  • ext_ply (int) – Extended GXPLY number (-1 to clear)

New in version 6.0.

License: Geosoft Open License

set_group_freeze_scale(group_num, scale)

Set a scale freezing value for the group (rDUMMY for disabled).

Parameters:
  • group_num (int) – Group number
  • scale (float) – Variable to fill with freeze scale

New in version 7.2.

License: Geosoft Open License

set_group_itr(group, itr)

Set group GXITR

Parameters:group (int) – Group number

New in version 9.3.

License: Geosoft Open License

Note: A group GXITR associate a color distribution with mixed vector groups (e.g. Drillhole Lithology tubes) groups. Used by legend UI support in 3D. Note that modifying this information does not currently change the group contents and a group needs to be regenerated (e.g. with maker) to refresh the objects.

set_group_moveable(group, move)

Set the movable attribute of a group.

Parameters:
  • group (str) – Group name
  • move (int) – 0 - not movable, 1 - movable

New in version 5.0.5.

License: Geosoft Open License

set_group_to_plane(plane, group)

Set a group to a plane

Parameters:
  • plane (int) – Plane Index to set all groups to
  • group (str) – Name of group to set

New in version 5.1.2.

License: Geosoft Open License

set_group_tpat(group, tpat)

Set group GXTPAT

Parameters:group (int) – Group number

New in version 9.3.

License: Geosoft Open License

Note: A group GXTPAT associate a thematic color map with mixed vector groups (e.g. Drillhole Lithology tubes) groups. Used by legend UI support in 3D. Note that modifying this information does not currently change the group contents and a group needs to be regenerated (e.g. with maker) to refresh the objects.

set_group_transparency(group_name, trans)

Sets the transparency value of group

Parameters:
  • group_name (str) – Group name
  • trans (float) – Transparency (1.0 - Opaque, 0.0 - Transparent)

New in version 6.0.

License: Geosoft Open License

set_ipj(ipj)

Set the projection of the view.

Parameters:ipj (GXIPJ) – GXIPJ to place in the view

New in version 5.0.

License: Geosoft Open License

Note: This function also sets the User GXIPJ, and automatically clears the WARP before doing so. This would be equivalent to calling _ClearWarp_IPJ' followed by `set_user_ipj on the view.

set_mark_moveable(move)

Set the movable attribute of marked groups.

Parameters:move (int) – 0 - not movable, 1 - movable

New in version 5.0.5.

License: Geosoft Open License

set_meta(group, meta, name)

Update the GXMETA in this group with the new meta object.

Parameters:
  • group (str) – Group Name
  • meta (GXMETA) – GXMETA object
  • name (str) – Meta name of Object

New in version 5.1.6.

License: Geosoft Open License

set_movability(movable)

Set the view movability

New in version 6.4.

License: Geosoft Open License

Note: Views are always physically movable in the API, this flag is for preventing accidental moving in the GXGUI. By default views are not movable.

set_plane_clip_ply(plane, pply)

Set the Plane Clip Region

Parameters:
  • plane (int) – Plane index
  • pply (GXPLY) – Clip Region

New in version 5.1.4.

License: Geosoft Open License

Note: By default it is the View’s Clip Region

set_plane_equation(plane, pitch, yaw, roll, x, y, z, sx, sy, str_val)

Set the equation of a plane

Parameters:
  • plane (int) – Plane index
  • pitch (float) – Rotation about X (Z toward Y +ve, between -360 and 360)
  • yaw (float) – Rotation about Y (Z toward X +ve, between -360 and 360)
  • roll (float) – Rotation about Z (Y toward X +ve, between -360 and 360)
  • x (float) – X offset of plane
  • y (float) – Y offset of plane
  • z (float) – Z offset of plane
  • sx (float) – X scale
  • sy (float) – Y scale
  • str_val (float) – Z scale

New in version 5.1.2.

License: Geosoft Open License

Note: For a grid with the “Y” axis giving elevation: use rotations = (-90, 0, 0) for a section with azimuth 90 (E-W) use rotations = (-90, 0, -90) for a section with azimuth 0 (N-S)

set_plane_surf_info(plane, sample, base, scale, min, max)

Set the surface information

Parameters:
  • plane (int) – Plane index
  • sample (int) – Sample rate (>=1)
  • base (float) – Base
  • scale (float) – Scale
  • min (float) – Min
  • max (float) – Max

New in version 5.1.2.

License: Geosoft Open License

set_plane_surface(plane, surface)

Set the surface image of a plane

Parameters:
  • plane (int) – Plane index
  • surface (str) – Optional surface image/grid name, can be NULL

New in version 5.1.2.

License: Geosoft Open License

set_render_order(order)

Set the view render order

Parameters:order (int) – Render order

New in version 6.3.

License: Geosoft Open License

Note: Views with lower numbers should render first, iDUMMY is undefined

set_thin_res(thin)

Set polyline/polygon thinning resolution

Parameters:thin (float) – Thinning resolution in mm, -1.0 to turn off.

New in version 5.0.

License: Geosoft Open License

Note: The thinning resolution controls the removal of redundant points from polylines and polygons. Points that deviate from a straight line by less than the thinning resolution are removed. This can significantly reduce the size of a GXMAP file. We recommend that you set the thinning resolution to 0.02 mm.

By default, the thinning resolution is set to 0.05mm.

Set resolution to 0.0 to remove colinear points only.

To turn off thinning after turning it on, call SetThinRes_MVIEW with a resolution of -1.

set_u_fac(hdc)

Set the unit conversion of a view.

Parameters:hdc (float) – New UFac value

New in version 5.0.

License: Geosoft Open License

set_user_ipj(ipj)

Set the user projection of the view.

Parameters:ipj (GXIPJ) – GXIPJ to place in the view

New in version 5.0.

License: Geosoft Open License

set_visibility(visible)

Set the view visibility

New in version 6.3.

License: Geosoft Open License

set_window(min_x, min_y, max_x, max_y, unit)

Set the view window

Parameters:
  • min_x (float) – X minimum
  • min_y (float) – Y minimum
  • max_x (float) – X maximum
  • max_y (float) – Y maximum
  • unit (int) – MVIEW_UNIT constants

New in version 5.0.

License: Geosoft Open License

Note: The current clip region will be set to the clip window.

set_working_ipj(ipj)

Set the working projection of the view.

Parameters:ipj (GXIPJ) – The input projection

New in version 5.0.

License: Geosoft Open License

Note: The working projection is the coordinate system of coordinates drawn to the view. The working coordinate system can be different than the view coordinate system, in which case the coordinates are re-projected to the view coordinate system before they are placed in the view.

See also

mode_pj to control use of the working projection.

size_symbols(vv_x, vv_y, vv_z)

Plot sized symbols

Parameters:
  • vv_x (GXVV) – X
  • vv_y (GXVV) – Y
  • vv_z (GXVV) – Symbol sizes (in view units)

New in version 5.0.

License: Geosoft Open License

sphere_3d(x, y, z, radius)

Draw a 3D sphere

Parameters:
  • x (float) – Center X
  • y (float) – Center Y
  • z (float) – Center Z
  • radius (float) – Radius

New in version 5.1.6.

License: Geosoft Open License

Note: The Fill color is used to color the sphere.

start_group(name, mode)

Start a group.

Parameters:

New in version 5.0.

License: Geosoft Open License

Note: Line and fill colors and thickness must be set before drawing to a group.

If the group name is NULL, output will be sent to the primary group stream and the MVIEW_GROUP constants is ignored.

Group names must be different from view names.

symb_angle(angle)

Set the Symb angle.

Parameters:angle (float) – Angle in degrees CCW from +X

New in version 5.0.

License: Geosoft Open License

symb_color(color)

Set the Symbol color.

Parameters:color (int) – Color

New in version 5.0.

License: Geosoft Open License

symb_fill_color(color)

Set the Symbol color fill.

Parameters:color (int) – Color

New in version 5.0.

License: Geosoft Open License

symb_font(face, geofont, weight, italic)

Set the symbol font and style.

Parameters:
  • face (str) – Face name
  • geofont (bool) – Geosoft font?
  • weight (int) – MVIEW_FONT_WEIGHT constants
  • italic (bool) – Italic font?

New in version 5.0.

License: Geosoft Open License

Note: If the font cannot be found, the DEFAULT_SYMBOL_FONT specified in the [MONTAJ] section of GEOSOFT.INI will be used.

See text_font for the font name syntax.

symb_number(number)

Set the Symbol number.

Parameters:number (int) – Symbol number

New in version 5.0.

License: Geosoft Open License

Note: The lower 16 bits of the number is interpreted as UTF-16 with a valid Unicode character code point. GFN fonts wil produce valid symbols depending on the font for 0x01-0x7f and the degree, plus-minus and diameter symbol(latin small letter o with stroke) for 0xB0, 0xB1 and 0xF8 respectively.

It is possible to check if a character is valid using GXUNC.is_valid_utf16_char. The high 16-bits are reserved for future use. Also see: GXUNC.valid_symbol and GXUNC.validate_symbols.

symb_size(size)

Set the Symb size.

Parameters:size (float) – Size in view units

New in version 5.0.

License: Geosoft Open License

symbol(x, y)

Plot a symbol

Parameters:
  • x (float) – X
  • y (float) – Y

New in version 5.0.

License: Geosoft Open License

symbols(vv_x, vv_y)

Plot symbols

Parameters:

New in version 5.0.

License: Geosoft Open License

symbols_itr(itr, vv_x, vv_y, vv_z)

Plot symbols using an GXITR

Parameters:

New in version 5.0.

License: Geosoft Open License

text(text, x, y)

Draw text.

Parameters:
  • text (str) – Text to plot
  • x (float) – X location of text
  • y (float) – Y location of text

New in version 5.0.

License: Geosoft Open License

text_angle(angle)

Set the text angle.

Parameters:angle (float) – Angle in degrees CCW from +X

New in version 5.0.

License: Geosoft Open License

text_color(color)

Set the Text color.

Parameters:color (int) – Color

New in version 5.0.

License: Geosoft Open License

text_font(face, geo_font, weight, italic)

Set the text font.

Parameters:
  • face (str) – Font face name
  • geo_font (int) – Geosoft font? (TRUE or FALSE)
  • weight (int) – MVIEW_FONT_WEIGHT constants
  • italic (int) – Italic font? (TRUE or FALSE)

New in version 5.0.

License: Geosoft Open License

Note: Font characteristics can be defined using the function parameters, or may be defined as decorations in the font name. A decorated font name has the following format:

font_name(type,weight,italics,charset)

where type - “TT” or “GFN” weight - last word from MVIEW_FONT_WEIGHT (ie. “LIGHT”) italics - “ITALICS” for for italics charset - Before version 6.2. this decoration was honoured and it affected the display of characters above ASCII 127. 6.2. introduced Unicode in the core montaj engine that eliminated the need for such a setting. All strings on the GX API level are encoded in UTF8 constants during runtime which makes it possible to represent all possible characters without using character sets. This decoration will now be ignored.

Qualifiers take precidence over passed parameters. The order of qualifiers is not relevant.

examples:

“sr(GFN,ITALICS)” - geosoft GFN font, normal weight, italics “Arial(TT,XBOLD)” - TrueType font, bold “Times(TT,ITALICS,_EastEurope)” - TrueType font, italics, Eastern Europe charcters

Decorated name qualifiers take precedence over passed parameters.

If the font cannot be found, or if “Default” is used, the DEFAULT_MAP_FONT specified in the [MONTAJ] section of GEOSOFT.INI will be used.

text_ref(ref)

Set the text plot reference point.

Parameters:ref (int) – TEXT_REF constants

New in version 5.0.

License: Geosoft Open License

text_size(size)

Set the text size.

Parameters:size (float) – Size in view units

New in version 5.0.

License: Geosoft Open License

Note: Because views may have differing X and Y scales this size can only make sense in one of these directions otherwise text would appear warped on these kinds of views. The X direction was chosen to represent the font size. For instance if the X scale is 1 unit/mm and my Y scale is 2 units/mm a font size of 3.0 view units will result in un-rotated text that appears 6 view units or 3mm high in the Y direction.

Another important thing to keep in mind that this size represents what is known as the “ascent” height of the font. The full height of the text may be higher if characters with accents or lower extension (e.g. the lowercase y) appear in the text. For TrueType fonts the mapping system will do a best effort positioning and sizing of the text using the alignment set and information about the font that it queries from the operating system. For instance; if Arial text “Blog” is placed at (0,0) and the alignment setting is Left-Bottom the left side of the B should be aligned at 0 in the X direction and the bottom of all the letters except y will be at 0 in the Y direction. The lower part of the y will extend below 0 in the Y (this is known as the “descent” height of the font at this size). The letters B and l should be very close to the size set here (this may differ slightly for different fonts).

tran_scale(x, y, xs, ys)

Set the view translation and scaling

Parameters:
  • x (float) – X origin (user X to be placed at map 0)
  • y (float) – Y origin (user Y to be placed at map 0)
  • xs (float) – X mm/user unit
  • ys (float) – Y mm/user unit

New in version 5.0.

License: Geosoft Open License

Note: Warning. For reasons unknown (and maybe a bug), this function resets the view GXIPJ units. It is a good idea to call the SetUnits_IPJ function after calling this function in order to restore them. This will be addressed in v6.4.

transparency(trans)

Sets the transparency for new objects.

Parameters:trans (float) – Transparency (1.0 - Opaque, 0.0 - Transparent)

New in version 6.0.

License: Geosoft Open License

Note: 1.0 Renders completely opaque objects while 0.0 will be transparent. Objects written after this will have a combined transparency value with the group transparency if it is set (e.g. 0.5 for group and 0.8 stream will result in 0.4).

update_met_afrom_group(group, meta)

Fill the GXMETA with group dataset information

Parameters:
  • group (str) – Group Name
  • meta (GXMETA) – GXMETA object to fill

New in version 5.1.6.

License: Geosoft Open License

user_to_view(x, y)

Convert a USERplot in mm to a VIEW coordinate

Parameters:
  • x (float_ref) – X in USER, returned in View coordinates
  • y (float_ref) – Y in USER, returned in View coordinates

New in version 5.0.

License: Geosoft Open License

view_to_plot(x, y)

Convert a VIEW coordinate to a plot coordinate in mm.

Parameters:
  • x (float_ref) – X in View, returned in mm from plot origin
  • y (float_ref) – Y in View, returned in mm from plot origin

New in version 5.0.

License: Geosoft Open License

view_to_user(x, y)

Convert a VIEW coordinate to a USER coordinate.

Parameters:
  • x (float_ref) – X in View, returned in user coordinates
  • y (float_ref) – Y in View, returned in user coordinates

New in version 5.0.

License: Geosoft Open License

voxd(voxd, name)

Add a Voxel Display (GXVOXD) object to the view.

Parameters:name (str) – Name Maximum length is MVIEW_NAME_LENGTH

New in version 6.2.

License: Geosoft Open License

write_group_storage(group, storage_name, bf)

Open generic existing storage associated with a group for reading.

Parameters:
  • group (int) – Group number
  • storage_name (str) – Storage name
  • bf (GXBF) – GXBF to read from

New in version 9.3.

License: Geosoft Open License

Note: External API users should not use storage names starting with “Geosoft”

z_value(val)

Sets Z-value info.

Parameters:val (float) – Z-Value

New in version 6.0.

License: Geosoft Open License

Note: This number is stored in map mainly for exports to other vector formats (e.g ShapeFiles) A contour map that’s exported to a shape file will use this value as a Z-value attributes for its shapes.

MAKER constants

Maker defines

MAKER_GX

GX

gxapi.MAKER_GX = 0

MVIEW_CLIP constants

Boolean clipping defines

CLIP_ON

Turn ON clipping

gxapi.CLIP_ON = 1
CLIP_OFF

Turn OFF clipping

gxapi.CLIP_OFF = 0

MVIEW_COLOR constants

24-bit color defines The color function can be used to create a color int from a color string description. The iColorXXX_MVIEW macros can be used to create colors from component intensities.

C_BLACK

Black

gxapi.C_BLACK = 33554432
C_RED

Red

gxapi.C_RED = 33554687
C_GREEN

Green

gxapi.C_GREEN = 33619712
C_BLUE

Blue

gxapi.C_BLUE = 50266112
C_CYAN

Cyan

gxapi.C_CYAN = 50331903
C_MAGENTA

Magenta

gxapi.C_MAGENTA = 50396928
C_YELLOW

Yellow

gxapi.C_YELLOW = 67043328
C_GREY

Grey

gxapi.C_GREY = 41975936
C_LT_RED

Light Red

gxapi.C_LT_RED = 54542336
C_LT_GREEN

Light Green

gxapi.C_LT_GREEN = 54526016
C_LT_BLUE

Light Blue

gxapi.C_LT_BLUE = 50348096
C_LT_CYAN

Light Cyan

gxapi.C_LT_CYAN = 50331712
C_LT_MAGENTA

Light Magenta

gxapi.C_LT_MAGENTA = 50348032
C_LT_YELLOW

Light Yellow

gxapi.C_LT_YELLOW = 54525952
C_LT_GREY

Light Grey

gxapi.C_LT_GREY = 54542400
C_GREY10

Grey 10%

gxapi.C_GREY10 = 51910680
C_GREY25

Grey 25%

gxapi.C_GREY25 = 54542400
C_GREY50

Grey 50%

gxapi.C_GREY50 = 41975936
C_WHITE

White

gxapi.C_WHITE = 50331648
C_TRANSPARENT

Transparent or no-draw

gxapi.C_TRANSPARENT = 0

MVIEW_CYLINDER3D constants

What parts of the cylinder are closed

MVIEW_CYLINDER3D_OPEN

Open

gxapi.MVIEW_CYLINDER3D_OPEN = 0
MVIEW_CYLINDER3D_CLOSESTART

Closestart

gxapi.MVIEW_CYLINDER3D_CLOSESTART = 1
MVIEW_CYLINDER3D_CLOSEEND

Closeend

gxapi.MVIEW_CYLINDER3D_CLOSEEND = 2
MVIEW_CYLINDER3D_CLOSEALL

Closeall

gxapi.MVIEW_CYLINDER3D_CLOSEALL = 3

MVIEW_DRAW constants

Polygon drawing defines

MVIEW_DRAW_POLYLINE

Draw Polylines

gxapi.MVIEW_DRAW_POLYLINE = 0
MVIEW_DRAW_POLYGON

Draw Polygons

gxapi.MVIEW_DRAW_POLYGON = 1

MVIEW_DRAWOBJ3D_ENTITY constants

What types of entities to draw

MVIEW_DRAWOBJ3D_ENTITY_POINTS

Draw 3D Points (no normals) [1 verticies per object]

gxapi.MVIEW_DRAWOBJ3D_ENTITY_POINTS = 0
MVIEW_DRAWOBJ3D_ENTITY_LINES

Draw 3D Lines (no normals) [2 verticies per object]

gxapi.MVIEW_DRAWOBJ3D_ENTITY_LINES = 1
MVIEW_DRAWOBJ3D_ENTITY_LINE_STRIPS

Draw 3D Line strip (no normals) [2+x verticies per object]

gxapi.MVIEW_DRAWOBJ3D_ENTITY_LINE_STRIPS = 2
MVIEW_DRAWOBJ3D_ENTITY_LINE_LOOPS

Draw 3D Line loop (no normals, closes loop with first point) [2+x verticies per object]

gxapi.MVIEW_DRAWOBJ3D_ENTITY_LINE_LOOPS = 3
MVIEW_DRAWOBJ3D_ENTITY_TRIANGLES

Draw 3D Triangles [3 verticies per object]

gxapi.MVIEW_DRAWOBJ3D_ENTITY_TRIANGLES = 4
MVIEW_DRAWOBJ3D_ENTITY_TRIANGLE_STRIPS

Draw 3D Triangle strips [3+x verticies per object]

gxapi.MVIEW_DRAWOBJ3D_ENTITY_TRIANGLE_STRIPS = 5
MVIEW_DRAWOBJ3D_ENTITY_TRIANGLE_FANS

Draw 3D Triangle fans [3+x verticies per object]

gxapi.MVIEW_DRAWOBJ3D_ENTITY_TRIANGLE_FANS = 6
MVIEW_DRAWOBJ3D_ENTITY_QUADS

Draw 3D Quads (Must be in the same plane) [4 verticies per object]

gxapi.MVIEW_DRAWOBJ3D_ENTITY_QUADS = 7
MVIEW_DRAWOBJ3D_ENTITY_QUADS_STRIPS

Draw 3D Quad Strips (Must be in the same plane) [4+2x verticies per object]

gxapi.MVIEW_DRAWOBJ3D_ENTITY_QUADS_STRIPS = 8
MVIEW_DRAWOBJ3D_ENTITY_POLYGONS

Draw 3D Quad Polygones (Must be in the same plane, must be convex and cannot intersect itself)

gxapi.MVIEW_DRAWOBJ3D_ENTITY_POLYGONS = 9

MVIEW_DRAWOBJ3D_MODE constants

What types of entities to draw

MVIEW_DRAWOBJ3D_MODE_FLAT

Draw flat shaded faces (one normal and color per object)

gxapi.MVIEW_DRAWOBJ3D_MODE_FLAT = 0
MVIEW_DRAWOBJ3D_MODE_SMOOTH

Draw smooth shaded faces (one normal and color per vertex)

gxapi.MVIEW_DRAWOBJ3D_MODE_SMOOTH = 1

MVIEW_EXTENT constants

Types of extents defines

MVIEW_EXTENT_ALL

All objects

gxapi.MVIEW_EXTENT_ALL = 0
MVIEW_EXTENT_CLIP

Clipping regions

gxapi.MVIEW_EXTENT_CLIP = 1
MVIEW_EXTENT_MAP

Map extents

gxapi.MVIEW_EXTENT_MAP = 2
MVIEW_EXTENT_VISIBLE

Visible objects

gxapi.MVIEW_EXTENT_VISIBLE = 3

MVIEW_FIT constants

Fit area defines

MVIEW_FIT_MAP

Fit it to the map area

gxapi.MVIEW_FIT_MAP = 0
MVIEW_FIT_VIEW

Fit it to the view area

gxapi.MVIEW_FIT_VIEW = 1

MVIEW_FONT_WEIGHT constants

Font weight defines

MVIEW_FONT_WEIGHT_NORMAL

Normal

gxapi.MVIEW_FONT_WEIGHT_NORMAL = 0
MVIEW_FONT_WEIGHT_ULTRALIGHT

Ultralight

gxapi.MVIEW_FONT_WEIGHT_ULTRALIGHT = 1
MVIEW_FONT_WEIGHT_LIGHT

Light

gxapi.MVIEW_FONT_WEIGHT_LIGHT = 2
MVIEW_FONT_WEIGHT_MEDIUM

Medium

gxapi.MVIEW_FONT_WEIGHT_MEDIUM = 3
MVIEW_FONT_WEIGHT_BOLD

Bold

gxapi.MVIEW_FONT_WEIGHT_BOLD = 4
MVIEW_FONT_WEIGHT_XBOLD

Xbold

gxapi.MVIEW_FONT_WEIGHT_XBOLD = 5
MVIEW_FONT_WEIGHT_XXBOLD

Xxbold

gxapi.MVIEW_FONT_WEIGHT_XXBOLD = 6

MVIEW_GRID constants

Grid Drawing defines

MVIEW_GRID_DOT

Dot

gxapi.MVIEW_GRID_DOT = 0
MVIEW_GRID_LINE

Line

gxapi.MVIEW_GRID_LINE = 1
MVIEW_GRID_CROSS

Cross

gxapi.MVIEW_GRID_CROSS = 2

MVIEW_GROUP constants

Open Group defines

MVIEW_GROUP_NEW

New Group (destroy any existing group)

gxapi.MVIEW_GROUP_NEW = 1
MVIEW_GROUP_APPEND

Append to an existing Group

gxapi.MVIEW_GROUP_APPEND = 0

MVIEW_GROUP_LIST constants

What groups to list

MVIEW_GROUP_LIST_ALL

All the groups.

gxapi.MVIEW_GROUP_LIST_ALL = 0
MVIEW_GROUP_LIST_MARKED

Those groups marked using the various mark functions.

gxapi.MVIEW_GROUP_LIST_MARKED = 1
MVIEW_GROUP_LIST_VISIBLE

Those groups checked as visible in the view/group manager.

gxapi.MVIEW_GROUP_LIST_VISIBLE = 2

MVIEW_HIDE constants

Boolean hidding defines

HIDE_ON

Turn ON hidding

gxapi.HIDE_ON = 1
HIDE_OFF

Turn OFF hidding

gxapi.HIDE_OFF = 0

MVIEW_IS constants

Defines for mview types

MVIEW_IS_AGG

Agg

gxapi.MVIEW_IS_AGG = 0
MVIEW_IS_MOVABLE

Movable

gxapi.MVIEW_IS_MOVABLE = 3
MVIEW_IS_CSYMB

Csymb

gxapi.MVIEW_IS_CSYMB = 4
MVIEW_IS_LINKED

Linked

gxapi.MVIEW_IS_LINKED = 5
MVIEW_IS_MADE

Made

gxapi.MVIEW_IS_MADE = 6
MVIEW_IS_HIDDEN

Hidden

gxapi.MVIEW_IS_HIDDEN = 7
MVIEW_IS_CLIPPED

Clipped

gxapi.MVIEW_IS_CLIPPED = 8
MVIEW_IS_META

Meta

gxapi.MVIEW_IS_META = 9
MVIEW_IS_VOXD

Voxd

gxapi.MVIEW_IS_VOXD = 10
MVIEW_IS_SHADOW_2D_INTERPRETATION

Shadow 2d interpretation

gxapi.MVIEW_IS_SHADOW_2D_INTERPRETATION = 11
MVIEW_IS_VECTOR3D

Vector3d

gxapi.MVIEW_IS_VECTOR3D = 12

MVIEW_LABEL_BOUND constants

Label Binding Defines

MVIEW_LABEL_BOUND_NO

Label Not Bound

gxapi.MVIEW_LABEL_BOUND_NO = 0
MVIEW_LABEL_BOUND_YES

Label Bound

gxapi.MVIEW_LABEL_BOUND_YES = 1

MVIEW_LABEL_JUST constants

Label Justification Defines

MVIEW_LABEL_JUST_TOP

Top

gxapi.MVIEW_LABEL_JUST_TOP = 0
MVIEW_LABEL_JUST_BOTTOM

Bottom

gxapi.MVIEW_LABEL_JUST_BOTTOM = 1
MVIEW_LABEL_JUST_LEFT

Left

gxapi.MVIEW_LABEL_JUST_LEFT = 2
MVIEW_LABEL_JUST_RIGHT

Right

gxapi.MVIEW_LABEL_JUST_RIGHT = 3

MVIEW_LABEL_ORIENT constants

Label Orientation Defines

MVIEW_LABEL_ORIENT_HORIZONTAL

Horizontal

gxapi.MVIEW_LABEL_ORIENT_HORIZONTAL = 0
MVIEW_LABEL_ORIENT_TOP_RIGHT

Top right

gxapi.MVIEW_LABEL_ORIENT_TOP_RIGHT = 1
MVIEW_LABEL_ORIENT_TOP_LEFT

Top left

gxapi.MVIEW_LABEL_ORIENT_TOP_LEFT = 2

MVIEW_NAME_LENGTH constants

Maximum length for view and group names

MVIEW_NAME_LENGTH

Maximum Length (1040)

gxapi.MVIEW_NAME_LENGTH = 1040

MVIEW_OPEN constants

Open GXMVIEW define

MVIEW_READ

Read Only - No changes

gxapi.MVIEW_READ = 0
MVIEW_WRITENEW

Create new GXMVIEW - destroys any existing GXMVIEW

gxapi.MVIEW_WRITENEW = 1
MVIEW_WRITEOLD

Open existing GXMVIEW for read/write (must exist)

gxapi.MVIEW_WRITEOLD = 2

MVIEW_PJ constants

Projection modes

MVIEW_PJ_OFF

No reprojection is used and all locations and attributes are assumed to be in the view coordinate system.

gxapi.MVIEW_PJ_OFF = 0
MVIEW_PJ_LOCATION

Only locations will be transformed to the view coordinate system.

gxapi.MVIEW_PJ_LOCATION = 1
MVIEW_PJ_ALL

Locations and attributes (sizes, thicknesses, angles) will be transformed to the view coordinate system.

gxapi.MVIEW_PJ_ALL = 2
MVIEW_PJ_ON

Mode before the last MVIEW_PJ_OFF.

gxapi.MVIEW_PJ_ON = 3

MVIEW_RELOCATE constants

Relocation Defines

MVIEW_RELOCATE_FIT

Will fit the image to fill the specified area

gxapi.MVIEW_RELOCATE_FIT = 0
MVIEW_RELOCATE_ASPECT

Will maintain aspect ratio

gxapi.MVIEW_RELOCATE_ASPECT = 1
MVIEW_RELOCATE_ASPECT_CENTER

Will maintain aspect ratio and center in specified area

gxapi.MVIEW_RELOCATE_ASPECT_CENTER = 2

MVIEW_SMOOTH constants

Interpolation method to use for drawing line and polygon edges

MVIEW_SMOOTH_NEAREST

Nearest neighbour

gxapi.MVIEW_SMOOTH_NEAREST = 0
MVIEW_SMOOTH_CUBIC

Cubic Spline

gxapi.MVIEW_SMOOTH_CUBIC = 1
MVIEW_SMOOTH_AKIMA

Akima

gxapi.MVIEW_SMOOTH_AKIMA = 2

MVIEW_TILE constants

Tiling defines

MVIEW_TILE_RECTANGULAR

Rectangular

gxapi.MVIEW_TILE_RECTANGULAR = 0
MVIEW_TILE_DIAGONAL

Diagonal

gxapi.MVIEW_TILE_DIAGONAL = 1
MVIEW_TILE_TRIANGULAR

Triangular

gxapi.MVIEW_TILE_TRIANGULAR = 2
MVIEW_TILE_RANDOM

Random

gxapi.MVIEW_TILE_RANDOM = 3

MVIEW_UNIT constants

Coordinate systems defines

MVIEW_UNIT_VIEW

View coordinates

gxapi.MVIEW_UNIT_VIEW = 0
MVIEW_UNIT_PLOT

Plot hi-metric (mm*100) on the map.

gxapi.MVIEW_UNIT_PLOT = 1
MVIEW_UNIT_MM

Plot mm on the map.

gxapi.MVIEW_UNIT_MM = 2
MVIEW_UNIT_VIEW_UNWARPED

View coordinates without a warp if there is one

gxapi.MVIEW_UNIT_VIEW_UNWARPED = 3

MVIEW_EXTENT_UNIT constants

Types of units for extents (these map to the MVIEW_UNIT constants defines directly)

MVIEW_EXTENT_UNIT_VIEW

MVIEW_UNIT_VIEW

gxapi.MVIEW_EXTENT_UNIT_VIEW = 0
MVIEW_EXTENT_UNIT_PLOT

MVIEW_UNIT_PLOT

gxapi.MVIEW_EXTENT_UNIT_PLOT = 1
MVIEW_EXTENT_UNIT_MM

MVIEW_UNIT_MM

gxapi.MVIEW_EXTENT_UNIT_MM = 2
MVIEW_EXTENT_UNIT_VIEW_UNWARPED

MVIEW_UNIT_VIEW_UNWARPED

gxapi.MVIEW_EXTENT_UNIT_VIEW_UNWARPED = 3

TEXT_REF constants

Text reference locations

TEXT_REF_BOTTOM_LEFT

Bottom left

gxapi.TEXT_REF_BOTTOM_LEFT = 0
TEXT_REF_BOTTOM_CENTER

Bottom center

gxapi.TEXT_REF_BOTTOM_CENTER = 1
TEXT_REF_BOTTOM_RIGHT

Bottom right

gxapi.TEXT_REF_BOTTOM_RIGHT = 2
TEXT_REF_MIDDLE_LEFT

Middle left

gxapi.TEXT_REF_MIDDLE_LEFT = 3
TEXT_REF_MIDDLE_CENTER

Middle center

gxapi.TEXT_REF_MIDDLE_CENTER = 4
TEXT_REF_MIDDLE_RIGHT

Middle right

gxapi.TEXT_REF_MIDDLE_RIGHT = 5
TEXT_REF_TOP_LEFT

Top left

gxapi.TEXT_REF_TOP_LEFT = 6
TEXT_REF_TOP_CENTER

Top center

gxapi.TEXT_REF_TOP_CENTER = 7
TEXT_REF_TOP_RIGHT

Top right

gxapi.TEXT_REF_TOP_RIGHT = 8

MVIEW_3D_RENDER constants

3D Geometry rendering defines. These flags only affect mixed geometry groups and not the data specific groups (e.g. voxels, vector voxels surfaces etc.). Each of those groups has predefined optimum behaviour and any changes to these flags are ignored.

MVIEW_3D_RENDER_BACKFACES

This flag is enabled if the backfaces of geometry should be rendered

gxapi.MVIEW_3D_RENDER_BACKFACES = 1
MVIEW_3D_DONT_SCALE_GEOMETRY

If the exaggeration scales of the 3D view in X, Y and/or Z is set to anything other than 1.0 any geometric objects (spheres, cubes etc.) for 3D groups with the following flags will render untransformed while only the centers of the objects are changed. This ensures the objects appear in the correct place with respect to other data being rendered (and scaled).

gxapi.MVIEW_3D_DONT_SCALE_GEOMETRY = 2