proc initialiseForm { } {
global section_range
global drillhole_location
global blockmodel_location
global object_location
global real_world_coords
set defaultParams [GuidoExecServer "GetSectionInformationForSaving" {}]
$drillhole_location setInputAllowed "[GuidoGetParamBufferValue $defaultParams section_database]"
$section_range setCurrentValue "[GuidoGetParamBufferValue $defaultParams section_range]"
$blockmodel_location setInputAllowed "[GuidoGetParamBufferValue $defaultParams section_block_model]"
$object_location setInputAllowed "[GuidoGetParamBufferValue $defaultParams section_objects]"
$real_world_coords setInputAllowed "[GuidoGetParamBufferValue $defaultParams oblique_section]"
}
GuidoApp check_section "CHECK SECTION FOR SAVING"
set section_ok [$check_section invoke]
$check_section destroy
if {"$section_ok" == "0"} {
GuidoForm stringSectionForm {
-help_id 1109
-action initial {[initialiseForm]}
-default_buttons
-tip DB_SAVE_SECTIONS
-label "Save sections to string files for plotting"
-layout BoxLayout Y_AXIS
GuidoPanel stringLocationPanel {
-label "Define the files to be created"
-layout CentreLineLayout
-border etched true
GuidoFileBrowserField drillhole_location {
-display_length 26
-file_mask *.str
-format none
-label "Drillhole section location"
-link secrange
-max_length FIO_MAX_LOCATION_LENGTH
-null false
-tip DB_SECTION_LOCATION
-translate lower
}
GuidoFileBrowserField current_graphics_location {
-display_length 26
-file_mask *.str
-format none
-label "Active graphic layer location"
-link secrange
-max_length FIO_MAX_LOCATION_LENGTH
-tip DB_CURRENT_LAYER_SECTION_LOCATION
-translate lower
}
GuidoFileBrowserField object_location {
-display_length 26
-file_mask *.str
-format none
-label "Objects section location"
-link secrange
-max_length FIO_MAX_LOCATION_LENGTH
-tip DB_SECTION_LOCATION
-translate lower
}
GuidoFileBrowserField blockmodel_location {
-display_length 26
-file_mask *.str
-format none
-label "Block model section location"
-link secrange
-max_length FIO_MAX_LOCATION_LENGTH
-tip DB_SECTION_LOCATION
-translate lower
-null false
}
GuidoField section_range {
-display_length 15
-format range
-label "Section range"
-max_length 32
-null false
-tip DB_SECTION_RANGE
-translate none
}
}
GuidoPanel sectionPropertiesPanel {
-label "Drillhole section properties"
-layout CentreLineLayout
-border etched true
-width 42
GuidoCheckBox real_world_coords {
-default false
-label "Real world coords for oblique sections"
-selected_value true
-tip DB_REAL_WORLD_COORDS_OBLIQUE_SECTION
-unselected_value false
}
GuidoField downhole_depths {
-default 1
-display_length 3
-format double
-high_bound 1000
-label "Downhole datapoint interval"
-low_bound .01
-max_length 5
-null false
-tip DB_DOWNHOLE_DEPTH_INTERVAL
}
}
}
while {1} {
set return_code [$stringSectionForm interact]
if {"$return_code" == "apply"} {
GuidoApp app "SAVE DH SECTIONS TO STRINGS"
$app setParam DrillholeLocation "[$drillhole_location getCurrentValue]"
$app setParam BlockmodelLocation "[$blockmodel_location getCurrentValue]"
$app setParam ObjectLocation "[$object_location getCurrentValue]"
$app setParam CurrentGraphicsLocation "[$current_graphics_location getCurrentValue]"
$app setParam SectionRange "[$section_range getCurrentValue]"
$app setParam RealWorldCoords "[$real_world_coords getCurrentValue]"
$app setParam DownholeDepths "[$downhole_depths getCurrentValue]"
set return_code [$app invoke]
$app destroy
break
} elseif {"$return_code" == "cancel"} {
break
}
}
$stringSectionForm destroy
}
