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
}
proc updateFieldList { table cfield wfield} {
upvar $cfield composite_field
upvar $wfield weighting_field
if {[info exists composite_field]} {
$composite_field setTableHandle [$table getCurrentValue]
$composite_field updateBrowserList
}
if {[info exists weighting_field]} {
$weighting_field setTableHandle [$table getCurrentValue]
$weighting_field updateBrowserList
}
}
GuidoForm SectionFences {
-default_buttons
-help_id 1622
-label "Extract section fence diagram for plotting"
-layout BoxLayout Y_AXIS
GuidoPanel SectionFences_1 {
-layout BoxLayout X_AXIS
GuidoPanel SectionFences_2 {
-border etched true
-label "Define the section file to create"
-layout CentreLineLayout
GuidoFileBrowserField location {
-display_length 26
-file_mask *.str
-format none
-label Filename
-max_length 252
-tip "DB_FENCE_LOCATION"
-null false
-translate lower
-file_access write
}
}
GuidoFiller SectionFences_3 {
-width 1
}
}
GuidoPanel SectionFences_4 {
-layout BoxLayout X_AXIS
GuidoPanel SectionFences_5 {
-border etched true
-label "Define the fence line"
-layout CentreLineLayout
GuidoScrollPane SectionFences_6 {
-height 20
-next_focus geology_tables
GuidoTable section_table {
-instances 1 1 100
-interactive true
set databaseHandle [getDatabaseHandle]
GuidoColumnValueBrowser hole_id {
-display_length 20
-format none
-label "Hole id"
-max_length 32
-null false
-exclusive true
-sorted_list true
-distinct true
-database_handle $databaseHandle
-table_handle collar
-column_handle hole_id
}
$hole_id updateBrowserList
}
}
}
GuidoFiller SectionFences_7 {
-width 3
}
GuidoPanel SectionFences_20 {
-border etched true
-layout BoxLayout Y_AXIS
GuidoPanel SectionFences_8 {
-border etched true
-label "Define the section extents"
-layout CentreLineLayout
GuidoPanel SectionFences_9 {
-layout CentreLineLayout
GuidoField elemin {
-display_length 10
-format double
-label "Z min"
-max_length 16
-next_focus elemax
-null false
-tip "Enter the minimum elevation for the volume in space in which the drill holes are to be extracted."
}
GuidoField elemax {
-display_length 10
-format double
-label "Z max"
-max_length 16
-next_focus dis1
-null false
-tip "Enter the maximum elevation for the volume in space in which the drill holes are to be extracted."
}
GuidoField depths {
-display_length 10
-format double
-default 1
-high_bound 1000
-label "Downhole datapoint interval"
-low_bound .01
-max_length 5
-null false
-tip "DB_DOWNHOLE_DEPTH_INTERVAL"
}
GuidoField pldepths {
-display_length 10
-format double
-default 0
-high_bound 1000
-label "Interval for plotting depths"
-low_bound 0
-max_length 5
-null false
-tip "12037_TIP_014"
}
}
}
GuidoFiller SectionFences_21 {
-height 2
}
GuidoPanel SectionFences_22 {
-border etched true
-layout BoxLayout X_AXIS
GuidoLabel SectionFences_23 {
-label "SEC_FENCE"
}
}
}
}
GuidoFiller SectionFences_10 {
-height 1
}
GuidoPanel SectionFences_11 {
-layout BoxLayout X_AXIS
GuidoPanel p0 {
-label "Define the sample tables"
-border etched true
GuidoScrollPane SectionFences_12 {
-height 5
-next_focus geology_tables
GuidoTable sample_tables {
-instances 1 1 5
-interactive true
set databaseHandle [getDatabaseHandle]
GuidoDatabaseTableBrowser sample_table {
-display_length 10
-format none
-exclusive true
-database_handle $databaseHandle
-table_types "point | interval"
-null true
-translate lower
-tip "Enter the names of up to 5 interval tables from which geology data is to be extracted."
}
$sample_table updateBrowserList
}
}
}
GuidoFiller SectionFences_13 {
-width 1
}
GuidoPanel p1 {
-border etched true
-label "Define the geology tables"
GuidoScrollPane SectionFences_14 {
-height 5
-next_focus diptable
GuidoTable geology_tables {
-instances 1 1 5
-interactive true
set databaseHandle [getDatabaseHandle]
GuidoDatabaseTableBrowser geology_table {
-display_length 10
-exclusive true
-database_handle $databaseHandle
-table_types "point | interval"
-null true
-translate lower
-tip "Enter the names of up to 5 interval tables from which geology data is to be extracted."
}
$geology_table updateBrowserList
}
}
}
GuidoFiller SectionFences_15 {
-width 1
}
GuidoPanel SectionFences_16 {
-border etched true
-label "Define the diplog table"
set databaseHandle [getDatabaseHandle]
GuidoDatabaseTableBrowser diptable {
-display_length 10
-exclusive true
-database_handle $databaseHandle
-table_types "point | interval"
-null true
-translate lower
-tip "12037_TIP_018"
}
$diptable updateBrowserList
}
}
}
