######################################################################
#
# Macro Name    : c:/sce_testing/0_after_19_9_05/blast_tutorial/03b_v_pattern.tcl
#
# Version       : Surpac Vision V5.2-C Beta
#
# Creation Date : Mon Jan 16 16:22:36 2006
#
# Description   : 
#
######################################################################

set status [ SclFunction "EXIT GRAPHICS" {
  frm00108={
    {
      exit_mode="E"
    }
  }
}]

set form {
  GuidoForm form_1 {
    -default_buttons
    -label "Exercise 3b - Load and tie in a V blast pattern"
    GuidoPanel panel_1 {
    -layout BoxLayout Y_AXIS
      GuidoTextArea gainfocus {
      -visible true
      -default "This text area is here to remove focus and highlighting from the second GuidoTextArea
                This text area must have visible set to true in order to gain focus"
      -height 0
      -width 0
      }
      GuidoLabel space {
      -height 0.5
      }
      GuidoScrollPane scroll_1 {
      -label ""
      -height 10
      -width 35
        GuidoTextArea text_1 {
        -format none
        -linewrap true
        -wrap_style_word true
        -linewrap true
        -input true
        -font_highlight 0 0 0
        -default "
In this exercise we unload a blast pattern from a blast database and create a surface V tie in pattern for it.

When the macro pauses click in graphics to continue

After having a look at each form, apply it to continue

"
        }
      }
      GuidoLabel space {
      -height 0.5
      }
    }
  }
}

SclCreateGuidoForm form_handle $form {
}

$form_handle SclRun {
}

set status [ SclFunction "GEOLOGY DATABASE DISCONNECT" {} ]

set status [ SclFunction "BLAST LOAD FROM DATABASE" {
  frm10010={
    {
      _action=display
      dbname="blast_tutorial.ddb"
    }
  }
  frmBlastLoadFromDatabase={
    {
      _action=display
      pattern="BP2"
    }
  }
}]

set status [ SclFunction "SELECT LAYER" {
  activelayer="blast hole layer"
}]

set status [ SclFunction "ERASE DESC" {
  frm00089={
    {
      range1=""
      range2=""
      range3=""
      textalignment="<"
      legend_location="no legend"
      layer_name="blast hole layer"
    }
  }
}]

########### pause here, wait for user response (say enter key), then proceed
puts ""
puts ""
puts ""
puts ""
puts "Click in graphics to continue."
puts ""
puts ""

SclPause

set status [ SclFunction "BLAST GENERATE FIRING SEQUENCE" {
  frm11114={
    {
      _action=display
      template_name="V-Pattern"
      tolerance="0.01"
      output_layer="tie_in"
      use_holes_from="Active layer"
    }
  }
  world_drag=table { objectx objecty objectz dx dy dz } {
    { "226.770" "634.060" "955.000" "0.000" "50.000" "0.000" }
    { "224.270" "644.060" "955.000" "-5.000" "-5.000" "0.000" }
    { "229.270" "644.060" "955.000" "5.000" "-5.000" "0.000" }
  }
}]

set status [ SclFunction "ERASE DESC" {
  frm00089={
    {
      range1=""
      range2=""
      range3=""
      textalignment="<"
      legend_location="no legend"
      layer_name="blast hole layer"
    }
  }
}]

set status [ SclFunction "ERASE DESC" {
  frm00089={
    {
      range1=""
      range2=""
      range3=""
      textalignment=">"
      legend_location="no legend"
      layer_name="blast hole layer"
    }
  }
}]

puts ""
puts ""
puts ""
puts ""
puts "Macro 03b_v_pattern.tcl completed."
puts ""
puts ""
