GuidoScript scripts/dtmutilities.tcl
proc holeLengthChange {hole_length length_panel set_length set_to_segment_panel segment_offset frm01130_3 segment_fix set_elevation_panel set_el dtm_layer_panel length_layer_name dtm_file_panel length_file_location length_file_id length_visible length_visible_label bearing dip} {
$length_panel setInputAllowed false
$set_length setInputAllowed false
$set_to_segment_panel setInputAllowed false
$segment_offset setInputAllowed false
$frm01130_3 setInputAllowed false
$segment_fix setInputAllowed false
$dtm_layer_panel setInputAllowed false
$set_elevation_panel setInputAllowed false
$set_el setInputAllowed false
$dtm_layer_panel setInputAllowed false
$length_layer_name setInputAllowed false
$dtm_file_panel setInputAllowed false
$length_file_location setInputAllowed false
$length_file_id setInputAllowed false
$length_visible setInputAllowed false
$length_visible_label setInputAllowed false
$bearing setInputAllowed false
$dip setInputAllowed false
if {"[$hole_length getCurrentValue]" == "Set Length"} {
$length_panel setInputAllowed true
$set_length setInputAllowed true
}
if {"[$hole_length getCurrentValue]" == "Set Elevation"} {
$set_el setInputAllowed true
$set_elevation_panel setInputAllowed true
}
if {"[$hole_length getCurrentValue]" == "Set to Segment"} {
$set_to_segment_panel setInputAllowed true
$segment_offset setInputAllowed true
$frm01130_3 setInputAllowed true
$segment_fix setInputAllowed true
}
if {"[$hole_length getCurrentValue]" == "DTM layer"} {
$dtm_layer_panel setInputAllowed true
$length_layer_name setInputAllowed true
}
if {"[$hole_length getCurrentValue]" == "DTM file"} {
$dtm_file_panel setInputAllowed true
$length_file_location setInputAllowed true
$length_file_id setInputAllowed true
$length_visible setInputAllowed true
$length_visible_label setInputAllowed true
}
if {"[ $hole_length getCurrentValue]" != "Selected Point"} {
$bearing setInputAllowed true
}
if {"[ $hole_length getCurrentValue]" != "Set to Segment" && "[ $hole_length getCurrentValue]" != "Selected Point"} {
$dip setInputAllowed true
}
}
GuidoForm frm01130 {
-default_buttons
-label "Bottom of hole parameters"
-tip "01130_TIP_001"
-layout BoxLayout Y_AXIS
-action final {[destroyTemporaryProcessedDTMSwa]}
GuidoPanel bottomPanel {
-layout BoxLayout Y_AXIS
-border etched true
-label "Toe elevation"
GuidoPanel combo_label {
-layout CentreLineLayout VERTICAL LEFT
GuidoComboBox hole_length {
-default "Set Length"
-display_length 9
-format none
-label "Toe position method"
-max_length 14
-null false
-tip "Select method for determining the bottom of the hole"
-value_in "Set Length" "Set Elevation" "DTM layer" "DTM file" "Set to Segment" "Selected Point"
}
}
GuidoFiller frm01130_1 {
-height 0.05
}
GuidoFiller frm01130_2 {
-height 0.05
}
GuidoPanel main_panel {
-layout OverlayLayout
GuidoPanel length_panel {
-layout CentreLineLayout VERTICAL LEFT
GuidoField set_length {
-label "Hole length"
-display_length 6
-format double
-low_bound .001
-max_length 20
-null false
-tip "Enter the length of all holes"
-translate upper
}
}
GuidoPanel set_to_segment_panel {
-layout BoxLayout Y_AXIS
GuidoPanel segment_offset_panel {
-layout CentreLineLayout VERTICAL LEFT
GuidoField segment_offset {
-label "Segment offset"
-display_length 6
-format double
-low_bound 0
-max_length 20
-null false
-tip "Enter the offset from the target segment.  The direction of the offset will be selected later"
}
}
GuidoFiller frm01130_1 {
-height 0.05
}
GuidoFiller frm01130_2 {
-height 0.05
}
GuidoPanel frm01130_3 {
-layout CentreLineLayout VERTICAL LEFT
-tip "01128_TIP_015"
GuidoButtonGroupPanel segment_fix {
-layout BoxLayout Y_AXIS
-label "Fix value"
GuidoRadioButton frm01130_4 {
-caption Bearing
-default true
-selected_value Bearing
-height 1
}
GuidoRadioButton frm01130_5 {
-caption Offset
-selected_value Offset
-height 1
}
}
}
}
GuidoPanel set_elevation_panel {
-layout CentreLineLayout VERTICAL LEFT
GuidoField set_el {
-label "Elevation"
-display_length 6
-format double
-max_length 20
-null false
-tip "Enter the elevation of the bottom of all holes"
-translate upper
}
}
GuidoPanel dtm_layer_panel {
-layout CentreLineLayout VERTICAL LEFT
GuidoComboBox length_layer_name {
-label "Layer name"
-display_length 12
-format double
-low_bound .001
-max_length "APP_MAX_LAYER_NAME_LENGTH"
-null false
-tip "Enter the layer name of the layer containing the bottom of hole DTM"
-translate upper
}
GuidoFiller frm01130_6 {
-height 0.05
}
GuidoFiller frm01130_7 {
-height 0.05
}
GuidoLabel obj_id_label {
-label "Object ID"
}
GuidoPanel frm01130_9 {
-layout CentreLineLayout VERTICAL LEFT
GuidoComboBox object_id_lay_bot {
-display_length 5
-format integer
-max_length 32
-translate none
-tip "Select the object ID to process"
}
GuidoLabel obj_name_lay {
-height 1
}
}
GuidoFiller frm01130_13 {
-height 0.05
}
GuidoFiller frm01130_14 {
-height 0.05
}
GuidoLabel trisolation_id_llab {
-label "Trisolation ID"
}
GuidoPanel frm01130_16 {
-layout CentreLineLayout VERTICAL LEFT
GuidoComboBox trisolation_id_lay_bot {
-display_length 5
-format integer
-max_length 32
-translate none
-tip "Select the trisolation ID to process"
}
GuidoLabel tri_name_lay {
-height 1
}
}
GuidoFiller frm01130_20 {
-height 0.05
}
}
GuidoPanel dtm_file_panel {
-layout CentreLineLayout VERTICAL LEFT
GuidoFileBrowserField length_file_location {
-label Location
-display_length 15.5
-link length_file_id
-file_mask *.dtm
-format none
-max_length 252
-null false
-next_focus length_file_id
-tip "Enter the location of the hole bottom DTM file"
-translate none
}
GuidoFiller frm01130_6 {
-height 0.05
}
GuidoFiller frm01130_7 {
-height 0.05
}
GuidoField length_file_id {
-label ID
-display_length 7.4
-format none
-max_length 10
-next_focus object_id_bot
-tip "Enter the id number of the bottom of hole DTM"
-translate none
}
GuidoFiller frm01130_6 {
-height 0.05
}
GuidoFiller frm01130_7 {
-height 0.05
}
GuidoLabel obj_id_label {
-label "Object ID"
}
GuidoPanel frm01130_9 {
-layout CentreLineLayout VERTICAL LEFT
GuidoComboBox object_id_bot {
-display_length 5
-format integer
-max_length 32
-translate none
-tip "Select the object ID to process"
}
GuidoLabel obj_name_bot {
-height 1
}
}
GuidoFiller frm01130_13 {
-height 0.05
}
GuidoFiller frm01130_14 {
-height 0.05
}
GuidoLabel trisolation_id_lab {
-label "Trisolation ID"
}
GuidoPanel frm01130_16 {
-layout CentreLineLayout VERTICAL LEFT
GuidoComboBox trisolation_id_bot {
-display_length 5
-format integer
-null false
-max_length 32
-translate none
-tip "Select the trisolation ID to process"
}
GuidoLabel tri_name_bot {
-height 1
}
}
GuidoFiller frm01130_20 {
-height 0.05
}
GuidoFiller frm01130_21 {
-height 0.05
}
GuidoFiller frm01130_21 {
-height 0.05
}
GuidoPanel frm01130_22 {
-layout CentreLineLayout VERTICAL LEFT
GuidoCheckBox length_visible {
-default false
-selected_value Yes
-tip "Select whether the bottom DTM, once loaded into memory, will be visible"
-unselected_value No
}
GuidoLabel length_visible_label {
-label "Make visible?"
}
}
}
}
GuidoPanel toe_type_panel {
-layout CentreLineLayout VERTICAL LEFT
GuidoField subdrill {
-display_length 8
-format double
-label "Subdrill distance"
-tip "Enter the subdrill distance required"
}
}
}
GuidoFiller spacer {
-height 0.5
}
GuidoPanel bottom_panel {
-layout CentreLineLayout VERTICAL LEFT
-border etched true
-label "Hole settings"
-width 22.8
GuidoField bearing {
-default 0
-display_length 6
-format decimal_angle
-label "Hole bearing"
-high_bound 6.283185307
-low_bound 0
-max_length 20
-null false
-tip "Enter the bearing of holes"
-translate upper
}
GuidoFiller frm01130_23 {
-height 0.05
}
GuidoFiller frm01130_24 {
-height 0.05
}
GuidoField dip {
-default -90
-display_length 6
-format decimal_angle
-label "Hole dip"
-high_bound 1.570796327
-low_bound -1.570796327
-max_length 20
-null false
-tip "Enter the dip of the holes"
-translate upper
}
GuidoFiller frm01130_25 {
-height 0.05
}
GuidoFiller frm01130_26 {
-height 0.05
}
GuidoField diameter {
-display_length 6
-format double
-label "Hole diameter"
-low_bound 0
-max_length 20
-null false
-tip "Enter the diameter of the holes"
-translate upper
}
}
$hole_length setActionCallback valueChanged {[holeLengthChange $hole_length $length_panel $set_length $set_to_segment_panel $segment_offset $frm01130_3 $segment_fix $set_elevation_panel $set_el $dtm_layer_panel $length_layer_name $dtm_file_panel $length_file_location $length_file_id $length_visible $length_visible_label $bearing $dip]}
$length_layer_name setActionCallback valueChanged {[fill_triobject_trisolation_details_for_layers $length_layer_name $object_id_lay_bot $obj_name_lay $trisolation_id_lay_bot $tri_name_lay]}
$length_file_location setActionCallback initial {[checkthecontent $length_file_location $length_file_id ".dtm" $object_id_bot $obj_name_bot $trisolation_id_bot $tri_name_bot]}
$length_file_location setActionCallback focusGained {[checkthecontent $length_file_location $length_file_id ".dtm" $object_id_bot $obj_name_bot $trisolation_id_bot $tri_name_bot]}
$object_id_lay_bot setActionCallback valueChanged {[fill_triobject_details $length_layer_name $object_id_lay_bot $obj_name_lay $trisolation_id_lay_bot $tri_name_lay "false" "true"]}
$trisolation_id_lay_bot setActionCallback valueChanged {[fill_trisolation_details $length_layer_name $object_id_lay_bot $trisolation_id_lay_bot $tri_name_lay "true" "true"]}
$trisolation_id_bot setActionCallback focusGained {[wrapperUpdateTrisolationDetailsForMultipleDtms $length_file_location $length_file_id ".dtm" $object_id_bot $trisolation_id_bot]}
$trisolation_id_bot setActionCallback valueChanged {[wrapperTrisolationChanged $length_file_location $length_file_id ".dtm" $object_id_bot $trisolation_id_bot $tri_name_bot]}
$object_id_bot setActionCallback focusGained {[WrapperUpdateObjectDetailsForMultipleDtms $length_file_location $length_file_id ".dtm" $object_id_bot $trisolation_id_bot ]}
$object_id_bot setActionCallback valueChanged {[wrapperTriobjectChanged $length_file_location $length_file_id ".dtm" $object_id_bot $obj_name_bot $trisolation_id_bot $tri_name_bot]}
$length_file_id setActionCallback focusLost {[checkthecontent $length_file_location $length_file_id ".dtm" $object_id_bot $obj_name_bot $trisolation_id_bot $tri_name_bot]}
-action initial {[holeLengthChange $hole_length $length_panel $set_length $set_to_segment_panel $segment_offset $frm01130_3 $segment_fix $set_elevation_panel $set_el $dtm_layer_panel $length_layer_name $dtm_file_panel $length_file_location $length_file_id $length_visible $length_visible_label $bearing $dip]}
}
