GuidoScript scripts/dtmutilities.tcl
global layer_name
global file_location
global file_id
global obj_id
global trisol_id
global obj_name
global trisol_name
global collar_elevation
proc triobject_details {file_location layer_name obj_id obj_name trisol_id trisol_name} {
global collar_elevation
if {[$collar_elevation getCurrentValue] == "DTM file"} {
fill_triobject_details $file_location $obj_id $obj_name $trisol_id $trisol_name "false" "false"
} elseif {[$collar_elevation getCurrentValue] == "DTM layer"} {
fill_triobject_details $layer_name $obj_id $obj_name $trisol_id $trisol_name "false" "true"
}
}
proc trisolation_details {file_location layer_name obj_id trisol_id trisol_name} {
global collar_elevation
if {[$collar_elevation getCurrentValue] == "DTM file"} {
fill_trisolation_details $file_location $obj_id $trisol_id $trisol_name "true" "false"
} elseif {[$collar_elevation getCurrentValue] == "DTM layer"} {
fill_trisolation_details $layer_name $obj_id $trisol_id $trisol_name "true" "true"
}
}
set buffer [GuidoExecServer LegacyGetCurrentDatabaseHandle [subst {sessionType = "GeologyDatabase"}]]
set status [ GuidoGetParamBufferValue $buffer status ]
if {$status >= 0} {
set dbHandle [ GuidoGetParamBufferValue $buffer DatabaseHandle ]
} else {
set dbHandle "0"
}
GuidoForm frm10500 {
-default_buttons
-help_id 339
-label "True blast boundary"
GuidoPanel frm10500_10 {
-layout BoxLayout Y_AXIS
GuidoPanel frm10500_20 {
-border etched true
-layout CentrelineLayout VERTICAL LEFT
GuidoPanel frm10500_21 {
-border etched true
-label "Define the blast boundary parameters"
-layout CentrelineLayout VERTICAL LEFT
GuidoField new_layer {
-display_length 15
-format none
-label "Define output layer"
-max_length "APP_MAX_LAYER_NAME_LENGTH"
-null false
-tip "10500_TIP_001"
-translate none
}
GuidoFiller filler {
-height 0.05
}
GuidoFiller filler {
-height 0.05
}
GuidoColumnValueBrowser pattern_identifier {
-display_length 15
-format none
-label "Pattern identifier"
-max_length 32
-null false
-exclusive true
-sorted_list true
-distinct true
-dependency {$dbHandle != "0"}
-database_handle $dbHandle
-table_handle collar
-column_handle blast_pattern
-tip "10500_TIP_003"
}
$pattern_identifier updateBrowserList
GuidoFiller filler {
-height 0.05
}
GuidoFiller filler {
-height 0.05
}
GuidoField string_number {
-display_length 15
-format integer
-low_bound 1
-high_bound 32000
-label "String number"
-max_length 5
-null false
-tip "10500_TIP_002"
-translate none
}
GuidoFiller filler {
-height 0.05
}
GuidoFiller filler {
-height 0.05
}
GuidoField arc_distance {
-default 1.0
-label "Arc distance"
-display_length 15
-format double
-low_bound 1.0
-max_length 8
-null false
-tip "10500_TIP_012"
}
}
GuidoFiller filler {
-height 0.05
}
GuidoFiller filler {
-height 0.05
}
GuidoFiller filler {
-height 0.05
}
GuidoPanel frm10500_40 {
-layout CentrelineLayout VERTICAL LEFT
GuidoCheckBox trisolations {
-default false
-display_length 1.5
-selected_value Y
-tip "10500_TIP_004"
-unselected_value N
}
GuidoLabel creates_cones_label {
-label "Create cones"
}
}
GuidoFiller filler {
-height 0.05
}
GuidoPanel p0 {
-layout CentrelineLayout VERTICAL LEFT
GuidoFiller filler {
-width 2
}
GuidoPanel p1 {
-layout CentrelineLayout VERTICAL LEFT
GuidoField cone_obj_id {
-dependency {"[ $trisolations getCurrentValue]" == "Y"}
-display_length 9
-format integer
-label "Object ID"
-high_bound 32000
-low_bound 1
-default 1
-null false
-input true
-max_length 5
-tip "Specify the object ID to be assigned to the Cones"
-translate upper
}
GuidoFiller fill {
-height 0.05
}
GuidoFiller fill {
-height 0.05
}
GuidoField cone_obj_name {
-dependency {"[ $trisolations getCurrentValue]" == "Y"}
-display_length 9
-label "Object name"
-null true
-input true
-max_length 32
-tip "Specify the name of the object to be assigned to the Cones"
-translate lower
}
}
}
GuidoFiller filler {
-height 0.05
}
GuidoFiller filler {
-height 0.05
}
GuidoFiller filler {
-height 0.05
}
GuidoPanel frm10500_30 {
-layout CentrelineLayout
GuidoCheckBox overwrite_cone_angle {
-default false
-display_length 1.5
-selected_value Yes
-tip "10500_TIP_013"
-unselected_value No
}
GuidoLabel cone_angle_label {
-label "Overwrite cone angle"
}
}
GuidoFiller filler {
-height 0.05
}
GuidoPanel p6 {
-layout CentreLineLayout VERTICAL LEFT
GuidoFiller filler {
-width 2
}
GuidoPanel p7 {
-layout CentreLineLayout VERTICAL LEFT
GuidoField cone_angle {
-dependency {"[ $overwrite_cone_angle getCurrentValue]" == "Yes"}
-label "Cone angle"
-display_length 9.5
-format double
-high_bound 90.000000
-low_bound 0.000000
-max_length 16
-null false
-tip "10500_TIP_005"
}
}
}
GuidoFiller filler {
-height 0.05
}
GuidoFiller filler {
-height 0.05
}
GuidoFiller filler {
-height 0.05
}
}
GuidoPanel p5 {
-layout CentreLineLayout  VERTICAL LEFT
-label "Define the collar elevation"
-border etched true
GuidoPanel p5 {
-layout CentreLineLayout  VERTICAL LEFT
GuidoComboBox collar_elevation {
-default "Fixed"
-display_length 15
-format none
-label "Collar elevation"
-max_length 14
-null false
-tip "10500_TIP_006"
-value_in "Fixed" "DTM layer" "DTM file"
}
}
GuidoFiller filler {
-height 0.05
}
GuidoFiller filler {
-height 0.05
}
GuidoFiller filler {
-width 0.05
}
GuidoPanel p3 {
-layout OverlayLayout
GuidoPanel p4 {
-layout CentreLineLayout  VERTICAL LEFT
-dependency {"[ $collar_elevation getCurrentValue]" == "Fixed"}
GuidoField fixed_elevation {
-dependency {"[ $collar_elevation getCurrentValue]" == "Fixed"}
-label Elevation
-display_length 20.5
-format double
-max_length 16
-next_focus layer_name
-null false
-tip "10500_TIP_007"
-translate upper
}
}
GuidoPanel p5 {
-layout CentreLineLayout  VERTICAL LEFT
-dependency {"[ $collar_elevation getCurrentValue]" != "Fixed"}
GuidoComboBox layer_name {
-dependency {"[ $collar_elevation getCurrentValue]" == "DTM layer"}
-display_length 13.5
-action valueChanged {[fill_triobject_trisolation_details_for_layers $layer_name $dtm_obj_id $dtm_obj_name $dtm_trisol_id $dtm_trisol_name]}
-label "Layer name"
-format none
-max_length "APP_MAX_LAYER_NAME_LENGTH"
-next_focus file_location
-null false
-tip "10500_TIP_008"
-translate none
}
GuidoFiller filler {
-height 0.05
}
GuidoFiller filler {
-height 0.05
}
GuidoFileBrowserField file_location {
-dependency {"[ $collar_elevation getCurrentValue]" == "DTM file"}
-action focusGained {[checkthecontent $file_location $file_id $dtm_obj_id $dtm_obj_name $dtm_trisol_id $dtm_trisol_name]}
-label Location
-display_length 16
-file_mask *.dtm
-format none
-link file_id
-max_length "FIO_MAX_LOCATION_LENGTH"
-next_focus file_id
-null false
-tip "10500_TIP_009"
-translate none
}
GuidoFiller filler {
-height 0.05
}
GuidoFiller filler {
-height 0.05
}
GuidoField file_id {
-dependency {"[ $collar_elevation getCurrentValue]" == "DTM file"}
-action focusLost {[checkthecontent $file_location $file_id $dtm_obj_id $dtm_obj_name $dtm_trisol_id $dtm_trisol_name]}
-display_length 16
-label ID
-format none
-max_length 16
-next_focus visible
-null false
-tip "10500_TIP_010"
-translate none
}
GuidoFiller filler {
-height 0.05
}
GuidoFiller filler {
-height 0.05
}
GuidoLabel obj_label {
-label "Object ID"
}
GuidoPanel p11 {
-layout BoxLayout X_AXIS
GuidoComboBox dtm_obj_id {
-display_length 6
-dependency {"[ $collar_elevation getCurrentValue]" != "Fixed"}
-action valueChanged {[triobject_details $file_location $layer_name $dtm_obj_id $dtm_obj_name $dtm_trisol_id $dtm_trisol_name]}
-high_bound 32000
-low_bound 1
-format integer
-max_length 6
-tip 10500_TIP_015
-translate none
}
GuidoFiller filler {
-width 0.2
}
GuidoLabel dtm_obj_name {}
}
GuidoFiller filler {
-height 0.05
}
GuidoFiller filler {
-height 0.05
}
GuidoLabel trisol_label {
-label "Trisolation ID"
}
GuidoPanel p12 {
-layout BoxLayout X_AXIS
GuidoComboBox dtm_trisol_id {
-dependency {"[ $collar_elevation getCurrentValue]" != "Fixed"}
-display_length 6
-action valueChanged {[trisolation_details $file_location $layer_name $dtm_obj_id $dtm_trisol_id $dtm_trisol_name]}
-high_bound 32000
-low_bound 1
-format integer
-max_length 6
-tip 10500_TIP_016
-translate none
}
GuidoFiller filler {
-width 0.2
}
GuidoLabel dtm_trisol_name {}
}
GuidoFiller filler {
-height 0.05
}
GuidoFiller filler {
-height 0.05
}
GuidoPanel frm10500_50 {
-layout CentrelineLayout VERTICAL LEFT
GuidoCheckBox visible {
-default false
-dependency {"[ $collar_elevation getCurrentValue]" == "DTM file"}
-selected_value Yes
-tip "10500_TIP_011"
-unselected_value No
}
GuidoLabel vis_label {
-dependency {"[ $collar_elevation getCurrentValue]" == "DTM file"}
-label "Display DTM?"
}
}
}
}
}
}
}
