GuidoScript scripts/dtmutilities.tcl
global dtm_layer
global object_id
global trisolation_id
global obj_name
global tri_name
proc validateDuplicationOflayers {} {
global new_bdy_layer
set new_layer [$new_bdy_layer getCurrentValue]
set buffer [ GuidoExecServer "GetLayerNames" {} ]
set layernames [GuidoGetParamBufferValue $buffer layers]
set layernameslist [split $layernames "\n"]
foreach item $layernameslist {
if {"$new_layer" == "$item"} {
GuidoMessage warning APP_LAYER_EXIST_ALREADY "$new_layer"
return false
}
}
}
GuidoForm frm01318 {
-default_buttons
-label "Apply a boundary to a DTM"
-layout BoxLayout Y_AXIS
-help_id 112
-tip "01318_TIP_001"
GuidoPanel frm01318_14 {
-layout CentreLineLayout Vertical Left
-border etched true
-label "Selected DTM"
-display_length 30.3
GuidoLabel dtm_layer_label {
-label "DTM name"
}
GuidoLabel dtm_layer {
-width 20
}
GuidoFiller filler {
-height 0.05
}
GuidoFiller filler {
-height 0.05
}
GuidoLabel triobject {
-label "Object ID"
}
GuidoPanel frm01320_6 {
-layout BoxLayout X_AXIS
GuidoLabel object_id {
-width 5
}
GuidoLabel obj_name {
-width 10
}
}
GuidoFiller filler {
-height 0.05
}
GuidoFiller filler {
-height 0.05
}
GuidoLabel trisol_panel {
-label "Trisolation ID"
}
GuidoPanel frm01320_7 {
-layout BoxLayout X_AXIS
GuidoLabel trisolation_id {
-width 5
}
GuidoLabel tri_name {
-width 10
}
}
}
GuidoPanel frm01318_16 {
-border etched true
-display_length 30.5
-label "Selected boundary string"
-layout CentreLineLayout VERTICAL LEFT
GuidoLabel bdy_layer_label {
-label "Layer name"
}
GuidoLabel bdy_layer {
-width 20
}
GuidoLabel bdystr_label {
-label "String number"
}
GuidoLabel bdystr {
-width 5
}
}
GuidoPanel frm01318_18 {
-border etched true
-label "Define results"
-layout CentreLineLayout Vertical Left
GuidoLabel frm01318_10 {
-label "Retain triangles"
-height 1
}
GuidoButtonGroupPanel inout {
-layout BoxLayout Y_AXIS
-tip "01318_TIP_002"
GuidoRadioButton frm01318_8 {
-caption "Inside the boundary"
-default true
-selected_value INSIDE
}
GuidoRadioButton frm01318_9 {
-caption "Outside the boundary"
-selected_value OUTSIDE
}
}
GuidoField new_bdy_layer {
-display_length 20
-format none
-label "New boundary layer"
-max_length 32
-tip "01318_TIP_003"
-translate lower
-validation {[validateDuplicationOflayers]}
}
}
}
