proc getAvailableOptions { } {
global v32
global v40
global v50
global datamine
global freeBM
set dataBuffer [ GuidoExecServer GetBlockModelParameters {} ]
set modelType [ GuidoGetParamBufferValue $dataBuffer ModelType ]
set maxRes [ GuidoGetParamBufferValue $dataBuffer MaxRes ]
if { $modelType == "variable" } {
$v32 setInputAllowed false
$v40 setInputAllowed false
$v50 setInputAllowed true
$datamine setInputAllowed true
$freeBM setInputAllowed true
} elseif { $modelType == "simple" } {
$v32 setInputAllowed false
$v40 setInputAllowed false
$v50 setInputAllowed false
$datamine setInputAllowed true
$datamine setCurrentValue true
$freeBM setInputAllowed true
} else {
if { $maxRes > 9 } {
$v32 setInputAllowed false
$v40 setInputAllowed false
$v50 setInputAllowed true
$datamine setInputAllowed true
$freeBM setInputAllowed true
}
}
}
proc toggle_warning {label1} {
global version
set value [$version getCurrentValue]
if { $value == "Surpac Version 3.2 Block Model" } {
$label1 setCurrentValue [GuidoMessage translate "BM_VERSION_V32_DESC"]
} elseif { $value == "Surpac Version 4.0 Block Model" } {
$label1 setCurrentValue [GuidoMessage translate "BM_VERSION_V40_DESC"]
} elseif { $value == "Surpac Version 5.0 Block Model" } {
$label1 setCurrentValue [GuidoMessage translate "BM_VERSION_V50_DESC"]
} elseif { $value == "Datamine Block Model" } {
$label1 setCurrentValue [GuidoMessage translate "BM_VERSION_DM_DESC"]
} else {
$label1 setCurrentValue [GuidoMessage translate "BM_VERSION_FBM_DESC"]
}
}
GuidoForm frm20010 {
-default_buttons
-help_id 1110
-label "Save Model"
-layout BoxLayout Y_AXIS
-tip BM_FILE_SAVE_TIP
-action initial {[getAvailableOptions]}
GuidoPanel frm20010_10 {
-layout CentreLineLayout
GuidoFileBrowserField modname {
-display_length 32
-file_mask "*.mdl *.dm *.fbm"
-format none
-label "Model name"
-max_length 256
-null false
-translate lower
-file_access write
-extension false
}
GuidoField description {
-display_length 32
-format none
-label Description
-max_length 256
-tip "BM_REBLOCK_NEW_DESC"
-translate none
}
}
GuidoPanel bottom_panel {
-layout BoxLayout X_AXIS
GuidoPanel frm20010_8 {
-border etched true
-label "Model Format"
-layout BoxLayout Y_AXIS
-tip BM_FILE_SAVE_FORMAT_TIP
GuidoButtonGroupPanel version {
-layout BoxLayout Y_AXIS
-action valueChanged { [toggle_warning $lbl]}
-action initial { [toggle_warning $lbl]}
GuidoRadioButton v32 {
-caption "Surpac Version 3.2 Block Model"
-selected_value "Surpac Version 3.2 Block Model"
-height 1
}
GuidoRadioButton v40 {
-caption "Surpac Version 4.0 Block Model"
-selected_value "Surpac Version 4.0 Block Model"
-height 1
}
GuidoRadioButton v50 {
-caption "Surpac Version 5.0 Block Model"
-selected_value "Surpac Version 5.0 Block Model"
-height 1
}
GuidoRadioButton datamine {
-caption "Datamine Block Model"
-selected_value "Datamine Block Model"
-height 1
}
GuidoRadioButton freeBM {
-caption "Surpac Free Block Model"
-selected_value "Surpac Free Block Model"
-height 1
}
}
}
GuidoPanel bot_right_panel {
-layout BoxLayout Y_AXIS
GuidoScrollPane frm20195_49 {
-label "Please Note"
-height 5
-width 30
GuidoTextArea lbl {
-height 9
-linewrap true
-wrap_style_word true
-format none
-font_highlight 255 0 0
}
}
}
}
}
