SclDrillholeSelect
Overview
This command permits you to select, in Graphics, drill holes that have been displayed. The hole ID and hole depth at the point of selection are assigned as arguments to the command.
Synopsis
SclDrillholeSelect $SelectionPrompt $DisplayDetails $MarkerLocation HoleID HoleDepth
Description
The specified selection prompt is displayed to advise you to use the mouse to select a drillhole. Details of the selected drillhole may be optionally displayed in the Message window. A marker may be optionally displayed to indicate the selected drillhole. The drillhole ID and depth of selection are assigned to the last 2 arguments to the command.
Arguments
- SelectionPrompt
- on
- off
- MarkerLocation
- collar
- location
- off
- HoleID
- HoleDepth
Passed by Value. Permitted values and their effect are:
The detils of the selected drillhole will be displayed in the message window.
No details of the selected drillhole are displayed in the message window.
Passed by value. Determines where, or if, a marker is displayed to show where the drillhole selection has snapped to the drillhole. Valid choices are:
The marker is drawn at the drillhole collar location.
The marker is drawn at the location on the drillhole trace that is closest to the position of the mouse when the mouse button was depressed.
No marker is shown at all.
Passed by reference. This is the variable to which the drillhole ID is to be assigned.
Passed by reference. This is the variable to which the depth of the selection event is assigned.
Returns
Returns $SCL_TRUE on successful execution. Returns $SCL_FALSE if the escape button is pressed. Throws a TCL error if there is no database connected.
Examples
#
# Get the handle to an existing database and prompt the user to
# select drillholes displaying a marker at the selection location
# and holeID and depth in the message window
#
if {[sclDatabases SclCountItems] < 1} {
error "No databases are connected"
}
sclDatabases SclGetItem DatabaseHandle 0
while {[SclDrillholeSelect "Select a drillhole. Press Escape to finish" "off" "location" holeid depth] == $SCL_OK} {
puts "[format "Selected hole ID=%s at depth=%.2f" $holeid $depth]"
}
|