proc make_units_list {frm01133 mass_units length_units volume_units is_metric} {
set buffer [ GuidoExecServer GetBlastDefaultUnits {} ]
set massUnits [GuidoGetParamBufferValue $buffer mass_units ]
set lengthUnits [GuidoGetParamBufferValue $buffer length_units ]
set volumeUnits [GuidoGetParamBufferValue $buffer volume_units ]
set massCurrentValue "[ $mass_units getCurrentValue ]"
set lengthCurrentValue "[ $length_units getCurrentValue ]"
set volumeCurrentValue "[ $volume_units getCurrentValue ]"
$mass_units removeAllItems
$length_units removeAllItems
$volume_units removeAllItems
if {"[$is_metric getCurrentValue]" == "true"} {
$mass_units setValues "Gram" "Kilogram"
$length_units setValues "Millimeter" "Centimeter" "Meter"
$volume_units setValues "Cubic millimeter" "Cubic centimeter" "Cubic meter"
} else {
$mass_units setValues "Pound" "Ounce"
$length_units setValues "Inch" "Foot" "Yard"
$volume_units setValues "Cubic inch" "Cubic foot" "Cubic yard"
}
$mass_units setCurrentValue $massCurrentValue
$length_units setCurrentValue $lengthCurrentValue
$volume_units setCurrentValue $volumeCurrentValue
$mass_units setDefault $massUnits
$length_units setDefault $lengthUnits
$volume_units setDefault $volumeUnits
}
proc initialize {frm01133 mass_units length_units volume_units is_metric} {
set isMetricCurrentValue "[ $is_metric getCurrentValue ]"
$is_metric setCurrentValue $isMetricCurrentValue
make_units_list $frm01133 $mass_units $length_units $volume_units $is_metric
}
GuidoForm frm01133 {
-default_buttons
-label "Blast Design Defaults"
-layout BoxLayout X_AXIS
-tip 01133_TIP_0
-help_id 1594
GuidoFiller frm01133_77 {
-width 0.5
}
GuidoTabbedPane tabs {
GuidoPanel drillDefaults {
-layout BoxLayout X_AXIS
-label "Drilling Defaults"
GuidoFiller frm01133_77 {
-width 0.5
}
GuidoPanel spacePanel {
-layout BoxLayout Y_AXIS
GuidoFiller frm01133_77 {
-height 0.5
}
GuidoPanel frm01133_73 {
-layout CentreLineLayout
-border etched true
GuidoButtonGroupPanel is_metric {
-label "Measurement system"
-layout BoxLayout X_AXIS
-tip "The system of measurement to use."
-action valueChanged {[make_units_list $frm01133 $mass_units $length_units $volume_units $is_metric]}
-action initial {[initialize $frm01133 $mass_units $length_units $volume_units $is_metric]}
GuidoRadioButton frm01133_11 {
-height 1
-caption metric
-default true
-selected_value true
}
GuidoRadioButton frm01133_13 {
-height 1
-caption imperial
-selected_value false
}
}
GuidoField diameter {
-display_length 10
-format double
-label "Hole Diameter"
-max_length 20
-next_focus units
-null false
-tip 01133_TIP_1
-translate upper
}
}
GuidoPanel frm01133_033 {
-border etched true
-layout CentreLineLayout
GuidoComboBox mass_units {
-display_length 10
-format none
-label "Mass units"
-max_length 20
-next_focus length_units
-null false
-tip 01133_TIP_11
}
GuidoComboBox length_units {
-display_length 10
-format none
-label "Length units"
-max_length 20
-next_focus volume_units
-null false
-tip 01133_TIP_12
}
GuidoComboBox volume_units {
-display_length 10
-format none
-label "Volume units"
-max_length 20
-next_focus detonators
-null false
-tip 01133_TIP_13
}
}
GuidoFiller frm01133_77 {
-height 0.5
}
GuidoPanel rigs {
-layout BoxLayout Y_AXIS
-border etched true
-label "Drill Rigs"
GuidoScrollPane frm01133_20 {
-height 10
GuidoTable drillRigs {
-instances 1 1 20
-interactive true
GuidoField rig {
-display_length 15
-format none
-label "Drill Rig"
-max_length 30
-null true
-tip "01133_TIP_014"
}
}
}
}
}
}
GuidoPanel chargingDefaults {
-layout CentrelineLayout
-label "Charging Defaults"
GuidoPanel explos {
-label Explosives
-border etched true
GuidoScrollPane frm01133_35 {
-height 6
GuidoTable explosives {
-instances 4 1 20
-interactive true
GuidoField explosive {
-display_length 15
-format none
-label "Explosive Name"
-max_length 30
-null false
-tip 01133_TIP_4
-translate none
}
GuidoField explosive_sg {
-display_length 10
-format double
-label SG
-max_length 8
-null false
-tip 01133_TIP_5
-translate none
}
GuidoField explosive_cost {
-display_length 10
-format double
-label "Cost per unit mass"
-max_length 8
-null false
-tip 01133_TIP_8
-translate none
}
}
}
}
GuidoPanel boosterPanel {
-border etched true
-label Boosters
GuidoScrollPane boosterScrollPane {
-height 6
GuidoTable boosters {
-instances 5 1 50
-interactive true
GuidoField booster {
-display_length 10
-format none
-label "Booster Name"
-max_length 30
-null false
-tip 01133_TIP_15
-translate none
}
GuidoField booster_mass {
-display_length 10
-format double
-label "Mass per booster"
-max_length 8
-null false
-tip 01133_TIP_17
-translate none
}
GuidoField booster_cost {
-display_length 10
-format double
-label "Cost per booster"
-max_length 8
-null false
-tip 01133_TIP_16
-translate none
}
}
}
}
GuidoPanel dets {
-border etched true
-label "Detonators / Delays"
GuidoScrollPane frm01133_48 {
-height 6
GuidoTable detonators {
-instances 3 1 20
-interactive true
GuidoComboBox detonator {
-display_length 8
-format none
-label "Product"
-max_length 30
-null false
-tip 01133_TIP_3
-translate none
-legacy_action
-exclusive false
}
GuidoComboBox delay {
-display_length 8
-format none
-label "Delay Name"
-max_length 30
-null false
-tip 01133_TIP_6
-translate none
-legacy_action
-exclusive false
}
GuidoField delay_time {
-display_length 8
-format double
-label "Delay Time (ms)"
-max_length 8
-low_bound 0.0
-null false
-tip 01133_TIP_7
-legacy_action
-translate upper
}
GuidoField detonator_cost {
-display_length 8
-format double
-label "Cost per unit"
-low_bound 0.0
-max_length 8
-null false
-tip "Per unit cost of the detonator"
-translate none
}
}
}
}
}
GuidoPanel rmcPanel {
-layout BoxLayout Y_AXIS
-label "Rock Classifications"
GuidoFiller space {
-height 0.5
}
GuidoScrollPane frm01133_72 {
-height 10
GuidoTable rmc {
-instances 1 1 20
-interactive true
GuidoField name {
-display_length 10
-format none
-label "Rock Name"
-max_length 30
-null true
-tip "01133_TIP_020"
}
GuidoField type {
-display_length 10
-format none
-label "Rock Description"
-max_length 30
-null true
-tip "FRM_01133_2"
}
GuidoField SG {
-display_length 5
-format double
-label SG
-max_length 8
-null true
-tip "Specific Gravity for rock type"
}
GuidoField hardness {
-display_length 5
-format double
-label Hardness
-max_length 8
-null true
-tip "Hardness value for rock type"
}
GuidoField jspace {
-display_length 5
-format double
-label "Joint Spacing"
-max_length 30
-null true
-tip "Rock joint spacing"
}
GuidoField pf {
-display_length 5
-format double
-label "Powder Factor"
-max_length 8
-null true
-tip "kg of explosive per unit of rock to blast"
}
GuidoField subdrill {
-display_length 5
-format double
-label "Sub Drill"
-max_length 8
-null true
-tip "Sub drill value for this rock classification"
}
GuidoField burden {
-display_length 5
-format double
-label "Burden"
-max_length 8
-null true
-tip "Burden for this rock classification"
}
GuidoField spacing {
-display_length 5
-format double
-label "Spacing"
-max_length 8
-null true
-tip "Spacing value for this rock classification"
}
GuidoField blastConeAngle {
-display_length 10
-format double
-decimals 2
-label "Blast cone angle"
-high_bound 90.0
-low_bound 0.0
-max_length 8
-null true
-translate upper
-tip "01133_TIP_9"
}
GuidoField drillingCost {
-display_length 10
-format double
-label "Drilling cost per unit length"
-max_length 8
-null true
-translate upper
-tip "01133_TIP_10"
}
}
}
}
GuidoPanel firingPanel {
-layout BoxLayout Y_AXIS
-label "Firing defaults"
GuidoFiller space {
-height 0.5
}
GuidoScrollPane frm01133_77 {
-height 10
GuidoTable firing {
-instances 1 1 20
-interactive true
GuidoField template_name {
-display_length 10
-format none
-label "Firing template name"
-max_length 32
-null true
-tip "This is the name of the firing template."
}
GuidoComboBox pattern {
-display_length 10
-format none
-label "Firing pattern"
-max_length 32
-value_in "V" "Diagonal" "Centre lift"
-default "V"
-null false
-tip "FRM_01133_1"
}
GuidoField no_of_rows {
-display_length 5
-format integer
-label "No. of rows"
-max_length 8
-null false
-tip "Number of rows a single surface delay would apply to."
}
GuidoComboBox surface_delay {
-legacy_dependency
-legacy_focus_gained_action
-display_length 20
-format none
-label "Surface delay"
-max_length 32
-exclusive true
-null false
-tip "This is the surface delay to be applied between rows or set of rows."
}
}
}
}
}
GuidoFiller frm01133_77 {
-width 0.5
}
}
