GuidoScript scripts/geologyutilities.tcl
proc getDatabaseHandle {} {
set buffer [GuidoExecServer LegacyGetCurrentDatabaseHandle [subst {sessionType = "GeologyDatabase"}]]
return [GuidoGetParamBufferValue $buffer DatabaseHandle]
}
proc updateGeoFieldList { table field } {
$field setTableHandle [$table getCurrentValue]
$field updateBrowserList
}
GuidoForm frm00617 {
-default_buttons
-help_id 870
-label "Define the Compositing Criteria"
-layout BoxLayout Y_AXIS
-tip MULTI_ELEMENT_FORM_TIP
GuidoPanel frm00617_105 {
-layout CentreLineLayout
GuidoLabel frm00617_2 {
-label "Table Name"
}
GuidoLabel table_name {}
}
GuidoFiller frm00617_106 {
-height 1
}
GuidoLabel frm00617_3 {
-font_style bold
-label "Define the individual compositing criteria"
}
GuidoScrollPane frm00617_86 {
-height 7
GuidoTable optional_fields {
-instances 1 1 26
-interactive true
-no_mlt
-row_headings a b c d e f g h i j k l m n o p q r s t u v w x y z
GuidoComboBox field_name {
-display_length 10
-format none
-label Field
-max_length 10
-tip MULTI_ELEMENT_FIELDS_TIP
}
GuidoComboBox op {
-default >=
-display_length 6
-label Operator
-format none
-max_length 4
-tip MULTI_ELEMENT_OPERATOR_TIP
-value_in >= <=
}
GuidoField value {
-display_length 10
-label "Limiting value"
-format none
-max_length 10
-tip MULTI_ELEMENT_LIMIT_TIP
-translate none
}
GuidoComboBox missing {
-default "ZERO VALUE"
-display_length 10
-label "Missing samples"
-exclusive false
-format none
-legacy_validation
-max_length 24
-tip MULTI_ELEMENT_NEGATIVE_VALUE_TIP
-value_in "" "ZERO VALUE" "INTERVAL MEAN"
}
GuidoComboBox inferior {
-default "USE VALUE"
-label "Inferior samples"
-display_length 10
-exclusive false
-format none
-legacy_validation
-max_length 24
-tip MULTI_ELEMENT_INFERIOR_SAMPLE_TIP
-value_in "" "USE VALUE" "ZERO VALUE" "INTERVAL MEAN"
}
}
}
GuidoFiller frm00617_107 {
-height 1
}
GuidoPanel frm00617_108 {
-layout CentreLineLayout
GuidoField comp_comb {
-display_length 30
-format none
-label "Composite combination"
-legacy_validation
-max_length 512
-null false
-tip MULTI_ELEMENT_COMBINATION_TIP
-translate lower
}
GuidoComboBox oa_missing_sample_value {
-default VALUE
-label "Output assay missing sample treatment"
-display_length 15
-exclusive false
-format none
-max_length 24
-tip MULTI_ELEMENT_NEGATIVE_VALUE_TIP2
-value_in VALUE "INTERVAL MEAN"
}
}
GuidoFiller frm00617_109 {
-height 1
}
GuidoPanel frm00617_111 {
-layout BoxLayout X_AXIS
GuidoPanel frm00617_110 {
-label "Define the sample fields required in the resulting string file"
-border etched true
-layout BoxLayout Y_AXIS
GuidoScrollPane frm00617_98 {
-height 7
-next_focus apply_button
GuidoTable assay_fields {
-instances 1 1 60
-interactive true
GuidoComboBox assay_field {
-display_length 10
-format none
-label "Field name"
-max_length 10
-tip MULTI_ELEMENT_SAMPLE_FIELDS_TIP
}
GuidoField out_missing {
-default 0
-dependency {"[ $oa_missing_sample_value getCurrentValue]" == "VALUE"}
-display_length 10
-format double
-label "Missing sample value"
-max_length 16
-null false
-tip MULTI_ELEMENT_MISSING_TIP
-translate upper
}
}
}
}
GuidoPanel geologyIntervalPanel {
-border etched true
-label "Define code for composite intervals"
-layout CentreLineLayout
GuidoComboBox write_codes {
-default ""
-exclusive true
-label "Write codes to"
-max_length 10
-null true
-value_in "database" "graphics"
-tip DB_WRITE_COMPOSITE_INTERVALS_TIP1
}
set databaseHandle [getDatabaseHandle]
GuidoDatabaseTableBrowser geo_table {
-display_length 12
-dependency {"[$write_codes getCurrentValue]" == "database"}
-exclusive true
-label "Table name"
-database_handle $databaseHandle
-table_types "interval"
-null false
-translate lower
-tip DB_WRITE_COMPOSITE_INTERVALS_TIP
}
$geo_table updateBrowserList
GuidoTableFieldBrowser geo_field {
-validation {[validateTableFieldPair $geo_table $geo_field]}
-dependency {"[$write_codes getCurrentValue]" == "database"}
-display_length 12
-format none
-database_handle $databaseHandle
-table_handle [$geo_table getCurrentValue]
-field_types "optional"
-label "Field name"
-max_length 18
-null false
-tip DB_WRITE_COMPOSITE_INTERVALS_TIP
-translate lower
}
$geo_field updateBrowserList
$geo_table setActionCallback valueChanged {[updateGeoFieldList $geo_table $geo_field]}
GuidoField geo_code {
-label "Interval code"
-dependency {"[$write_codes getCurrentValue]" != ""}
-display_length 12
-format none
-max_length 32
-null false
-tip DB_WRITE_COMPOSITE_INTERVALS_TIP
-translate none
}
}
}
}
