GuidoScript scripts/geologyutilities.tcl
proc getDatabaseHandle {} {
set buffer [GuidoExecServer LegacyGetCurrentDatabaseHandle [subst {sessionType = "GeologyDatabase"}]]
return [GuidoGetParamBufferValue $buffer DatabaseHandle]
}
proc updateFieldList { table wfield} {
upvar $wfield weighting_field
if {[info exists weighting_field]} {
$weighting_field setTableHandle [$table getCurrentValue]
$weighting_field updateBrowserList
}
}
GuidoForm frm00616 {
-default_buttons
-label "Multi Element Compositing"
-legacy_validation
-layout BoxLayout Y_AXIS
-tip "00616_TIP_001"
GuidoLabel frm00616_2 {
-label "Define the output to produce"
}
GuidoPanel frm00616_53 {
-layout BoxLayout X_AXIS
GuidoPanel frm00616_51 {
-layout BoxLayout Y_AXIS
GuidoPanel frm00616_16 {
-layout BoxLayout X_AXIS
-tip "00616_TIP_002"
GuidoButtonGroupPanel out_type {
-layout BoxLayout X_AXIS
-label "Output to "
GuidoRadioButton frm00616_14 {
-caption "String File"
-selected_value "STRING FILE"
}
GuidoRadioButton frm00616_15 {
-caption "Database table"
-next_focus string_loc
-selected_value "DATABASE TABLE"
}
}
}
GuidoFiller fill_height1 {
-height 1
}
GuidoPanel overlay_str_db {
-layout OverlayLayout
GuidoPanel overlay_str {
-layout CentreLineLayout
-dependency {"[ $out_type getCurrentValue]" == "STRING FILE"}
GuidoFileBrowserField string_loc {
-dependency {"[ $out_type getCurrentValue]" == "STRING FILE"}
-display_length 20
-label Location
-format none
-max_length 252
-next_focus database_table
-tip "00616_TIP_003"
-file_mask *.str
-link file_id
-file_access write
}
GuidoField file_id {
-dependency {"[ $out_type getCurrentValue]" == "STRING FILE"}
-display_length 10
-label "ID number"
-format double
-max_length 16
-next_focus string_no
-null false
-tip "00616_TIP_003"
}
GuidoField string_no {
-default 1
-dependency {"[ $out_type getCurrentValue]" == "STRING FILE"}
-display_length 5
-label "String number"
-format integer
-high_bound 32000
-low_bound 1
-max_length 5
-next_focus no_zone_string
-null false
-tip "Enter the string number to use for ouput composites."
}
GuidoField no_zone_string {
-default 2
-dependency {"[ $out_type getCurrentValue]" == "STRING FILE"}
-display_length 5
-label "No zone string"
-format integer
-high_bound 32000
-low_bound 1
-max_length 5
-next_focus no_sample_string
-null false
-tip "00616_TIP_006"
}
GuidoField no_sample_string {
-default 3
-dependency {"[ $out_type getCurrentValue]" == "STRING FILE"}
-display_length 5
-label "No sample string"
-format integer
-high_bound 32000
-low_bound 1
-max_length 5
-null false
-tip "00616_TIP_007"
}
GuidoFiller frm00616_58 {
-width 1
}
}
GuidoPanel overlay_db {
-layout CentreLineLayout
-dependency {"[ $out_type getCurrentValue]" == "DATABASE TABLE"}
GuidoComboBox database_table {
-dependency {"[ $out_type getCurrentValue]" == "DATABASE TABLE"}
-display_length 20
-label "Database table"
-format none
-max_length 14
-next_focus log_file
-null false
-tip "00616_TIP_008"
}
GuidoFileBrowserField log_file {
-dependency {"[ $out_type getCurrentValue]" == "DATABASE TABLE"}
-display_length 20
-label "REPORT_FILE_NAME"
-format none
-max_length 256
-next_focus file_id
-tip "REPORT_FILE_NAME_TIP"
-file_mask reports|*.log
-file_access write
}
}
}
GuidoFiller frm00616_59 {
-height 1
}
GuidoPanel frm00616_62 {
-layout BoxLayout X_AXIS
-label "Define the geological zones"
-border etched true
GuidoPanel frm00616_60 {
-layout CentreLineLayout
GuidoPanel frm00616_25 {
-font_style bold
-label "Zone selection method"
-layout BoxLayout X_AXIS
-tip "DB_COMPOSITE_BY_GRADE_SELECTION_TIP"
GuidoButtonGroupPanel selection {
-layout BoxLayout X_AXIS
GuidoRadioButton frm00616_22 {
-caption "No Selection"
-selected_value "NO SELECTION"
}
GuidoRadioButton frm00616_23 {
-caption "Multiple Zones"
-selected_value "MULTIPLE ZONES"
}
GuidoRadioButton frm00616_24 {
-caption "Zone From To"
-next_focus frm00616_27
-selected_value "ZONE FROM TO"
}
}
}
GuidoPanel frm00616_29 {
-font_style bold
-label "Waste interval treatment"
-layout BoxLayout X_AXIS
-tip "00616_TIP_011"
GuidoButtonGroupPanel waste {
-layout BoxLayout X_AXIS
GuidoRadioButton frm00616_27 {
-caption "Include Waste"
-selected_value "INCLUDE WASTE"
}
GuidoRadioButton frm00616_28 {
-caption "Ignore Waste"
-next_focus sm_cutoff
-selected_value "IGNORE WASTE"
}
}
GuidoField sm_cutoff {
-default 0
-display_length 6
-format double
-label "Min waste width "
-max_length 6
-tip "Select the minimum allowable width for intervening waste bands."
}
}
}
GuidoFiller frm00616_63 {
-width 1
}
}
GuidoFiller frm00616_64 {
-height 1
}
GuidoPanel frm00616_67 {
-layout BoxLayout X_AXIS
set databaseHandle [getDatabaseHandle]
GuidoDatabaseTableBrowser table_name {
-display_length 15
-format none
-label "Sample table name"
-max_length 18
-next_focus dilution
-null false
-database_handle $databaseHandle
-table_types interval
-translate lower
-tip "Enter the optional interval table name containing the sample data which is to be composited."
}
$table_name updateBrowserList
GuidoFiller frm00616_68 {
-width 1
}
GuidoField dilution {
-display_length 4
-format double
-high_bound 9999.000000
-label "Max internal dilution"
-low_bound 0.000000
-max_length 4
-null false
-tip "00616_TIP_014"
}
GuidoFiller frm00616_69 {
-width 1
}
}
GuidoFiller frm00616_69 {
-height 1
}
GuidoPanel frm00616_71 {
-layout BoxLayout X_AXIS
GuidoButtonGroupPanel outchoice {
-layout BoxLayout X_AXIS
-label "Composite reference point"
-tip DB_SAMPLE_COORDINATE_TIP
GuidoRadioButton frm00616_70 {
-caption bottom
-selected_value bottom
}
GuidoRadioButton frm00616_71 {
-caption middle
-selected_value middle
}
GuidoRadioButton frm00616_72 {
-caption segment
-selected_value segment
}
GuidoRadioButton frm00616_73 {
-caption top
-selected_value top
}
}
}
GuidoPanel frm00616_72 {
-layout BoxLayout X_AXIS
}
GuidoPanel frm00616_76 {
-layout BoxLayout X_AXIS
GuidoPanel frm00616_75 {
-border etched true
-layout CentreLineLayout
-label "Output Composite Parameters"
GuidoField min_width {
-display_length 4
-format double
-high_bound 999.000000
-label "Minimum composite width"
-low_bound 0.000000
-max_length 4
-next_focus apply_mining_width
-null false
-tip "00616_TIP_015"
}
GuidoCheckBox apply_mining_width {
-default false
-label "Apply mining width"
-next_focus min_spacing
-selected_value YES
-unselected_value NO
}
GuidoLabel mcs {
-dependency {"[ $apply_mining_width getCurrentValue]" == "NO"}
-label "Minimum composite spacing"
}
GuidoField min_spacing {
-default 0
-dependency {"[ $apply_mining_width getCurrentValue]" == "NO"}
-display_length 4
-format double
-high_bound 9999.000000
-low_bound 0.000000
-max_length 4
-next_focus frm00616_38
-null false
-tip "00616_TIP_016"
}
GuidoLabel an_pos {
-dependency {"[ $apply_mining_width getCurrentValue]" == "YES"}
-label "Anchor position"
}
GuidoPanel frm00616_40 {
-dependency {"[ $apply_mining_width getCurrentValue]" == "YES"}
-layout BoxLayout X_AXIS
-tip "00616_TIP_016"
GuidoButtonGroupPanel anchor_position {
-layout BoxLayout X_AXIS
GuidoRadioButton frm00616_38 {
-caption Top
-selected_value TOP
}
GuidoRadioButton frm00616_39 {
-caption Bottom
-default true
-next_focus mining_width
-selected_value BOTTOM
}
}
}
GuidoLabel mw {
-dependency {"[ $apply_mining_width getCurrentValue]" == "YES"}
-label "Mining width"
}
GuidoField mining_width {
-default 0.001
-dependency {"[ $apply_mining_width getCurrentValue]" == "YES"}
-display_length 8
-format double
-high_bound 9999.000000
-low_bound 0.001000
-max_length 8
-next_focus weighting_fields
-null false
-tip "00616_TIP_016"
}
}
GuidoFiller frm00616_77 {
-width 1
}
GuidoPanel scroll_label {
-layout BoxLayout Y_AXIS
-label "Optional Weighting Fields"
-border etched true
GuidoScrollPane frm00616_50 {
-height 7
-width 25
GuidoTable weighting_fields {
-instances 1 1 5
-interactive true
GuidoTableFieldBrowser weighting_field {
-validation {[validateTableFieldPair $table_name $weighting_field]}
-database_handle $databaseHandle
-table_handle [$table_name getCurrentValue]
-field_types "optional,calculated"
-display_length 10
-translate lower
-format none
-label "Field Name"
-max_length 18
-tip "DB_COMPOSITE_OPT_WGT_FLD_TIP"
}
$weighting_field updateBrowserList
$table_name setActionCallback valueChanged {[updateFieldList $table_name weighting_field]}
GuidoField weighting_default {
-default 1
-display_length 10
-format none
-label "Default value"
-max_length 10
-null false
-tip "00616_TIP_020"
}
}
}
}
GuidoFiller frm00616_77 {
-width 1
}
}
}
}
}
