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

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

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

set form {
  GuidoForm form_1 {
    -default_buttons
    -label "Exercise 3c - Load and tie in a 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 12
      -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 customised surface tie in pattern for it.

Note the option to \"Snap to start, inflection points and end point\" has been selected

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 "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"
    }
  }
}]

set status [ SclFunction "BLAST GENERATE CUSTOMISED FIRING SEQUENCE" {
  frm11115={
    {
      _action=display
      output_layer="tie_in"
      use_holes_from="Active layer"
      row_number="1"
      delay_name="Excel LP DET 1 (200ms)"
      tolerance="0.01"
      reset_rowtime="No"
      digitise_points="3"
    }
  }
  digitise_point=table { winx winy objectx objecty objectz } {
    { "-0.622" "-0.298" "181.522" "659.116" "955.004" }
    { "-0.619" "-0.026" "181.703" "669.242" "955.004" }
  }
}]

########### 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 form {
  GuidoForm form_2 {
    -default_buttons
    -label "Increment row number"
    GuidoPanel panel_2 {
    -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_2 {
      -label ""
      -height 6
      -width 25
        GuidoTextArea text_2 {
        -format none
        -linewrap true
        -wrap_style_word true
        -linewrap true
        -input true
        -font_highlight 0 0 0
        -default "
Next the function increment row number has been used to give an example of how it is used for a customised tie in.
"

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

SclCreateGuidoForm form_handle $form {
}

$form_handle SclRun {
}

set status [ SclFunction "BLAST INCREMENT ROW NUMBER" {
  digitise_point={
    {
      winx="-0.619"
      winy="-0.376"
      objectx="181.703"
      objecty="656.223"
      objectz="955.004"
    }
    {
      winx="-0.585"
      winy="-0.293"
      objectx="184.237"
      objecty="659.297"
      objectz="955.004"
    }
    {
      winx="-0.582"
      winy="-0.030"
      objectx="184.418"
      objecty="669.061"
      objectz="955.004"
    }
    {
      winx="-0.619"
      winy="0.028"
      objectx="181.703"
      objecty="671.231"
      objectz="955.004"
    }
    {
      _action="cancel"
    }
    {
      winx="-0.619"
      winy="0.111"
      objectx="181.703"
      objecty="674.304"
      objectz="955.004"
    }
    {
      winx="-0.547"
      winy="-0.035"
      objectx="186.952"
      objecty="668.880"
      objectz="955.004"
    }
    {
      winx="-0.545"
      winy="-0.298"
      objectx="187.133"
      objecty="659.116"
      objectz="955.004"
    }
    {
      winx="-0.619"
      winy="-0.449"
      objectx="181.703"
      objecty="653.511"
      objectz="955.004"
    }
    {
      _action="cancel"
    }
    {
      winx="-0.624"
      winy="-0.507"
      objectx="181.341"
      objecty="651.341"
      objectz="955.004"
    }
    {
      winx="-0.525"
      winy="-0.303"
      objectx="188.581"
      objecty="658.935"
      objectz="955.004"
    }
    {
      winx="-0.520"
      winy="-0.016"
      objectx="188.943"
      objecty="669.603"
      objectz="955.004"
    }
    {
      winx="-0.622"
      winy="0.174"
      objectx="181.522"
      objecty="676.655"
      objectz="955.004"
    }
    {
      _action="cancel"
    }
    {
      winx="-0.619"
      winy="0.227"
      objectx="181.703"
      objecty="678.644"
      objectz="955.004"
    }
    {
      winx="-0.478"
      winy="-0.055"
      objectx="192.020"
      objecty="668.157"
      objectz="955.004"
    }
    {
      winx="-0.480"
      winy="-0.308"
      objectx="191.839"
      objecty="658.755"
      objectz="955.004"
    }
    {
      winx="-0.619"
      winy="-0.575"
      objectx="181.703"
      objecty="648.810"
      objectz="955.004"
    }
    {
      _action="cancel"
    }
    {
      winx="-0.448"
      winy="-0.108"
      objectx="194.192"
      objecty="666.168"
      objectz="955.004"
    }
    {
      winx="-0.440"
      winy="-0.317"
      objectx="194.735"
      objecty="658.393"
      objectz="955.004"
    }
    {
      winx="-0.619"
      winy="-0.633"
      objectx="181.703"
      objecty="646.640"
      objectz="955.004"
    }
    {
      _action="cancel"
    }
    {
      winx="-0.413"
      winy="-0.171"
      objectx="196.726"
      objecty="663.817"
      objectz="955.004"
    }
    {
      winx="-0.408"
      winy="-0.303"
      objectx="197.088"
      objecty="658.935"
      objectz="955.004"
    }
    {
      winx="-0.622"
      winy="-0.701"
      objectx="181.522"
      objecty="644.109"
      objectz="955.004"
    }
    {
      _action="cancel"
    }
    {
      winx="-0.378"
      winy="-0.235"
      objectx="199.260"
      objecty="661.467"
      objectz="955.004"
    }
    {
      winx="-0.378"
      winy="-0.312"
      objectx="199.260"
      objecty="658.574"
      objectz="955.004"
    }
    {
      winx="-0.627"
      winy="-0.764"
      objectx="181.160"
      objecty="641.758"
      objectz="955.004"
    }
    {
      _action="cancel"
    }
    {
      winx="-0.343"
      winy="-0.303"
      objectx="201.795"
      objecty="658.935"
      objectz="955.004"
    }
    {
      winx="-0.622"
      winy="-0.842"
      objectx="181.522"
      objecty="638.865"
      objectz="955.004"
    }
    {
      _action="cancel"
    }
    {
      winx="-0.619"
      winy="0.300"
      objectx="181.703"
      objecty="681.356"
      objectz="955.004"
    }
    {
      winx="-0.301"
      winy="-0.312"
      objectx="204.872"
      objecty="658.574"
      objectz="955.004"
    }
    {
      winx="-0.622"
      winy="-0.876"
      objectx="181.522"
      objecty="637.600"
      objectz="955.004"
    }
    {
      _action="cancel"
    }
  }
}]

puts ""
puts ""
puts ""
puts ""
puts "Macro 03c_custom_pattern.tcl completed."
puts ""
puts ""
