set oldvalue " "
proc switch_type {class_att_name class_att_type type_label} {
global oldvalue
set newvalue "[ $class_att_name getCurrentValue ]"
if {[string compare $oldvalue $newvalue] != 0} {
set buffer [ GuidoExecServer "GetAttributeData" [subst {attribute = "$newvalue"} ]]
set status [ GuidoGetParamBufferValue $buffer status ]
if {$status >= 0} {
set data_type [ GuidoGetParamBufferValue $buffer type ]
set isCalculated [ GuidoGetParamBufferValue $buffer calculated ]
set isNumeric [ GuidoGetParamBufferValue $buffer numeric ]
if {[string compare $data_type "integer"] == 0 ||
[string compare $data_type "double"] == 0 ||
[string compare $data_type "float"] == 0 ||
([string compare $isCalculated "true"] == 0 &&
[string compare $isNumeric "true"] == 0)} {
$class_att_type setCurrentValue "(Numeric)"
$type_label setCurrentValue "(Numeric)"
} else {
$class_att_type setCurrentValue "(Character)"
$type_label setCurrentValue "(Character)"
}
}
}
set oldvalue "[ $class_att_type getCurrentValue ]"
$class_att_type setInputAllowed false
}
proc init_type { class_att_name class_att_type type_label} {
set newvalue "[ $class_att_name getCurrentValue ]"
set buffer [ GuidoExecServer "GetAttributeData" [subst {attribute = "$newvalue"} ]]
set status [ GuidoGetParamBufferValue $buffer status ]
if {$status >= 0} {
set data_type [ GuidoGetParamBufferValue $buffer type ]
set isCalculated [ GuidoGetParamBufferValue $buffer calculated ]
set isNumeric [ GuidoGetParamBufferValue $buffer numeric ]
if {[string compare $data_type "integer"] == 0 ||
[string compare $data_type "double"] == 0 ||
[string compare $data_type "float"] == 0 ||
([string compare $isCalculated "true"] == 0 &&
[string compare $isNumeric "true"] == 0)} {
$class_att_type setCurrentValue "(Numeric)"
$type_label setCurrentValue "(Numeric)"
} else {
$class_att_type setCurrentValue "(Character)"
$type_label setCurrentValue "(Character)"
}
}
$class_att_type setInputAllowed false
}
GuidoForm frm20048 {
-default_buttons
-label "Sections From Block Model"
-layout BoxLayout Y_AXIS
-tip "20048_TIP_001"
GuidoPanel p1 {
-layout CentreLineLayout
GuidoPanel p2 {
-layout BoxLayout Y_AXIS
GuidoPanel frm20048_41 {
-border etched true
-label "Define the section files to create :"
-layout CentreLineLayout
GuidoFileBrowserField location {
-display_length 14
-font_style bold
-format none
-label Location
-max_length FIO_MAX_LOCATION_LENGTH
-tip "20048_TIP_002"
}
GuidoPanel frm20048_17 {
-font_style bold
-label Extract
-layout BoxLayout X_AXIS
-tip "20048_TIP_003"
GuidoButtonGroupPanel extract_type {
GuidoRadioButton frm20048_15 {
-caption "Block Outlines"
-selected_value "Block Outlines"
-height 1
}
GuidoRadioButton frm20048_16 {
-caption Centroids
-next_focus tolerance
-selected_value Centroids
-height 1
}
}
}
GuidoField tolerance {
-default 0
-dependency {"[ $extract_type getCurrentValue]" == "Block Outlines"}
-display_length 14
-font_style bold
-format none
-label Shrinkage
-max_length 26
-next_focus frm20048_19
-tip "SECTION_DEF_BM_SHRINKAGE_TIP"
}
GuidoPanel frm20048_21 {
-font_style bold
-label Coordinates
-layout BoxLayout X_AXIS
-tip "20048_TIP_005"
GuidoButtonGroupPanel scr_coords {
GuidoRadioButton frm20048_19 {
-caption "Section View"
-selected_value "Section View"
-height 1
}
GuidoRadioButton frm20048_20 {
-caption "Real World"
-next_focus constrain
-selected_value "Real World"
-height 1
}
}
}
GuidoCheckBox constrain {
-default true
-font_style bold
-label "Constrain model?"
-next_focus report_attributes
-selected_value Y
-tip "20048_TIP_006"
-unselected_value N
}
GuidoCheckBox report_attributes {
-default true
-font_style bold
-label "Output all attributes?"
-selected_value Y
-unselected_value N
-tip "20048_TIP_006"
}
GuidoLabel l0 {
-label "Output Attributes"
}
GuidoScrollPane frm20048_30 {
-height 6
-width  20
GuidoTable attributes {
-instances 1 1 50
-interactive true
GuidoComboBox attribute {
-dependency {"[ $report_attributes getCurrentValue]" == "N"}
-display_length 12
-label "Attribute name"
-font_style bold
-format none
-max_length BM_MAX_ATT_NAME_LEN
-tip "20190_TIP_011"
}
}
}
}
}
GuidoPanel p3 {
-layout BoxLayout Y_AXIS
GuidoPanel frm20048_48 {
-border etched true
-label "Define the String Classification Attribute :"
-layout BoxLayout Y_AXIS
GuidoPanel frm20048_47 {
-layout CentreLineLayout
GuidoLabel attribute_label {
-label "Model Attribute"
}
GuidoPanel group_panel_1 {
-layout FlowLayout Left 0 0
GuidoComboBox class_att_name {
-display_length 15
-format none
-max_length BM_MAX_ATT_NAME_LEN
-null false
-tip "20048_TIP_009"
}
GuidoFiller filler1 {
-width 1
}
GuidoPanel type_label_panel {
-layout Overlaylayout
GuidoPanel p10 {
-layout FlowLayout Left 0 0
-dependency {"[$class_att_name getCurrentValue]" == " keep this field hidden "}
GuidoField class_att_type {
-font_style bold
-width 8
}
}
GuidoPanel p11 {
-layout FlowLayout Left 0 0
-dependency {"[$class_att_name getCurrentValue]" != " always show this field "}
GuidoLabel type_label {
-label "(Character)"
}
}
}
}
$class_att_name setActionCallback focusGained {[switch_type $class_att_name $class_att_type $type_label]}
$class_att_type setActionCallback initial {[ init_type $class_att_name $class_att_type $type_label]}
GuidoFiller filler2 {
-height .5
}
GuidoFiller filler3 {
-height .5
}
GuidoPanel p4 {
-layout Overlaylayout
GuidoPanel p5 {
-layout FlowLayout Right 0 0
-dependency {"[$class_att_type getCurrentValue]" == "(Numeric)"}
GuidoLabel l1 {
-label "Numeric Range"
}
}
GuidoPanel p6 {
-layout FlowLayout Right 0 0
-dependency {"[$class_att_type getCurrentValue]" == "(Character)"}
GuidoLabel l2 {
-label "Character Range"
}
}
}
GuidoPanel p7 {
-layout OverlayLayout
GuidoPanel p8 {
-layout FlowLayout Left 0 0
-dependency {"[$class_att_type getCurrentValue]" == "(Numeric)"}
GuidoField class_att_rng {
-display_length 15
-font_style bold
-format range
-dependency {"[$class_att_type getCurrentValue]" == "(Numeric)"}
-max_length MAX_RNG_LENGTH
-tip "20048_TIP_010"
}
}
GuidoPanel p9 {
-layout FlowLayout Left 0 0
-dependency {"[$class_att_type getCurrentValue]" == "(Character)"}
GuidoScrollPane frm20048_38 {
-height 7
GuidoTable class_char_list {
-instances 1 1 60
-interactive true
-dependency {"[$class_att_type getCurrentValue]" == "(Character)"}
GuidoField char_val {
-display_length 12
-font_style bold
-format none
-label "Character Value"
-max_length 50
-dependency {"[$class_att_type getCurrentValue]" == "(Character)"}
-tip "20048_TIP_011"
}
GuidoField string_no {
-default 1
-display_length 7
-font_style bold
-format integer
-high_bound 32000
-label "String No."
-low_bound 1
-max_length 5
-dependency {"[$class_att_type getCurrentValue]" == "(Character)"}
-null false
-tip "20048_TIP_011"
}
}
}
}
}
}
GuidoPanel frm20048_100 {
-layout CentreLineLayout
GuidoComboBox section_face_block {
-label "Choose block face to section"
-default "Previous"
-display_length 15
-format none
-max_length 30
-null false
-tip "20048_TIP_013"
-value_in "Previous" "Next" "Both"
}
}
}
}
}
}
