GuidoScript forms/SurveyInstrumentCommon.tcl
GuidoApp check_db "CHECK SURVEY DATABASE EXISTS"
set result [$check_db invoke]
$check_db destroy
if {$result == "0"} {
GuidoForm surpacFormatFile {
-default_buttons
-label "Select Surpac format file"
-tip SRV_SURPAC_FORMAT_FILE_TIP
-help_id 1598
GuidoTabbedPane format_tabs {
GuidoPanel inputs_panel {
-layout CentreLineLayout
-font_style bold
-label "Files"
GuidoFileBrowserField obsfile {
-label "Surpac format file"
-display_length 15
-format none
-max_length 256
-null false
-translate lower
-extension false
-file_mask *.sdf
-tip SRV_SURPAC_DATAREC_FORMAT_TIP
}
GuidoCheckBox archive {
-label "Archive survey"
-default true
-selected_value Y
-unselected_value N
-tip "SURVEY_ARCHIVE_TIP2"
}
GuidoFileBrowserField archive_directory {
-label "Archive directory"
-dependency {"[ $archive getCurrentValue]" == "Y"}
-browser_type directory
-display_length 28
-max_length 256
-file_mask "*.*"
-absolutePath
-tip "SURVEY_ARCHIVE_TIP"
}
}
GuidoPanel accuracies_panel {
-font_style bold
-layout BoxLayout Y_AXIS
-label "Options"
GuidoFiller accs_45_1a {
-height 0.5
}
GuidoPanel accuracies_panel1 {
-layout BoxLayout X_AXIS
GuidoComboBox instrument {
-display_length 10
-format none
-max_length 128
-null true
-exclusive false
-label "Instrument type"
-tip INSTRUMENT_TYPE
-action initial {[initializeInstrumentList $instrument]}
-action valueChanged {[instrumentChanged $instrument $angle_accuracy $inst_height_accuracy $targ_height_accuracy $dist_accuracy $inst_centring_accuracy $targ_centring_accuracy $dist_parts_per_million]}
}
}
GuidoFiller accs_45_1a {
-height 0.5
}
GuidoPanel accs_52 {
-border etched true
-label RESECTION_ACCS_TEXT
-layout CentreLineLayout
GuidoPanel accs_49 {
-layout BoxLayout X_AXIS
GuidoPanel accs_51 {
-layout CentreLineLayout
GuidoField angle_accuracy {
-default 3
-display_length 5
-format double
-label SRV_RESEC_ANGLE_SD
-low_bound 0
-max_length 10
-next_focus dist_accuracy
-null false
-tip SRV_RESEC_ACCS_ANGLE_TIP
-translate upper
-decimals 4
}
GuidoFiller accs_45_1 {
-height 0.5
}
GuidoFiller accs_45_1a {
-height 0.5
}
GuidoField inst_height_accuracy {
-default 0.003
-display_length 5
-format double
-label "Instrument height sd"
-low_bound 0
-max_length 10
-next_focus inst_centring_accuracy
-null false
-tip SRV_RESEC_ACCS_INST_HT_TIP
-translate upper
-decimals 4
}
GuidoFiller accs_45_2 {
-height 0.5
}
GuidoFiller accs_45_a {
-height 0.5
}
GuidoField targ_height_accuracy {
-default 0.003
-display_length 5
-format double
-label "Target height sd"
-low_bound 0
-max_length 10
-next_focus targ_centring_accuracy
-null false
-tip SRV_RESEC_ACCS_TARG_HT_TIP
-translate upper
-decimals 4
}
GuidoFiller accs_45_3 {
-height 0.5
}
GuidoFiller accs_45_3a {
-height 0.5
}
}
GuidoFiller accs_45 {
-width 1
}
GuidoPanel accs_53 {
-layout CentreLineLayout
GuidoField dist_accuracy {
-default 0.005
-display_length 5
-format double
-label "Distance standard deviation"
-low_bound 0
-max_length 10
-next_focus dist_parts_per_million
-null false
-tip SRV_RESEC_ACCS_DIST_TIP
-translate upper
-decimals 4
}
GuidoFiller accs_45_4 {
-height 0.5
}
GuidoFiller accs_45_4a {
-height 0.5
}
GuidoField inst_centring_accuracy {
-default 0.003
-display_length 5
-format double
-label "Instrument centring sd"
-low_bound 0
-max_length 10
-next_focus targ_height_accuracy
-null false
-tip SRV_RESEC_ACCS_INST_CENT_TIP
-translate upper
-decimals 4
}
GuidoFiller accs_45_5 {
-height 0.5
}
GuidoFiller accs_45_5a {
-height 0.5
}
GuidoField targ_centring_accuracy {
-default 0.003
-display_length 5
-format double
-label "Target centring sd"
-low_bound 0
-max_length 10
-next_focus angle_accuracy
-null false
-tip SRV_RESEC_ACCS_TARG_CENT_TIP
-translate upper
-decimals 4
}
GuidoFiller accs_45_6 {
-height 0.5
}
GuidoFiller accs_45_6a {
-height 0.5
}
}
GuidoFiller accs_451 {
-width 1
}
GuidoPanel accs_54 {
-layout CentreLineLayout
GuidoField dist_parts_per_million {
-default 2
-display_length 5
-format double
-label SRV_RESEC_DIST_PPM
-low_bound 0
-max_length 10
-next_focus inst_height_accuracy
-null false
-tip SRV_RESEC_ACCS_DISTPPM_TIP
-translate upper
-decimals 4
}
}
}
}
}
}
}
set buffer [GuidoExecServer GetFormValue [subst {function = "ALL DATA RECORDERS" form = "frm00256(0)." field = "archive"}]]
set value [GuidoGetParamBufferValue $buffer value]
if {$value == ""} {
set value "N"
}
$archive setCurrentValue $value
set archiveDirectory [GuidoSSIOption get "surveying archive directory"]
if {$archiveDirectory == ""} {
set archiveDirectory ".\\archive"
}
$archive_directory setCurrentValue $archiveDirectory
set return_code [$surpacFormatFile interact]
if {$return_code != "cancel"} {
saveInstruments $instrument $angle_accuracy $inst_height_accuracy $targ_height_accuracy $dist_accuracy $inst_centring_accuracy $targ_centring_accuracy $dist_parts_per_million
GuidoApp app "SURPAC DATA RECORDER FORMAT"
$app setParam "SurpacFileName" [$obsfile getCurrentValue]
$app setParam "Archive" [$archive getCurrentValue]
$app setParam "ArchiveDirectory" [$archive_directory getCurrentValue]
$app setParam "AngleSD" [$angle_accuracy getCurrentValue]
$app setParam "InstHtSD" [$inst_height_accuracy getCurrentValue]
$app setParam "TargHtSD" [$targ_height_accuracy getCurrentValue]
$app setParam "DistanceSD" [$dist_accuracy getCurrentValue]
$app setParam "InstCentrSD" [$inst_centring_accuracy getCurrentValue]
$app setParam "TargCentrSD" [$targ_centring_accuracy getCurrentValue]
$app setParam "DistancePPM" [$dist_parts_per_million getCurrentValue]
GuidoExecServer SaveFormValue [subst {function_name = "ALL DATA RECORDERS" form_name = "frm00256(0)." table = "" field_name = "archive" value = "[$archive getCurrentValue]"}]
set return_status [$app invoke]
$app destroy
}
$surpacFormatFile destroy
}
