######################################################################
#
# Macro Name    : c:/tutorials/drill_and_blast/data/07_blast_database.tcl
#
# Version       : Surpac Vision V5.2-C
#
# Creation Date : Tue Jun 27 14:02:07 2006
#
# Description   : 
#
######################################################################

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

set status [ SclFunction "RECALL ANY FILE" {
  file="grade_control.ddb"
  mode="openInNewLayer"
}]

set status [ SclFunction "CLEAR DATABASE" {
  frm10060={
    {
      conf="Y"
    }
  }
}]

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

set status [ SclFunction "EXECUTE OS COMMAND" {
  frm00462={
    {
      os_cmd="del grade_control.not"
    }
  }
}]

set status [ SclFunction "OPEN FILE" {
  layer="blast hole layer"
  location="upload_holes1.str"
  plugin="Surpac String Files"
  Surpac={
    IDRange=""
    range=""
    descriptions="true"
  }
  styles=""
  replace="true"
  rescale="true"
}]

set status [ SclFunction "BLAST LOAD TO DATABASE" {
  frm01126={
    {
      _action=display
      load_charging_data="N"
      load_sample_data="Y"
      sample_table_name="sample"
      sample_prefix="%ID%-"
      increment_start="1"
      padding_length="0"
      padding_char="0"
      sample_suffix=""
      increment_method="continuous"
      sampling_method="fixed length"
      sample_lengths="5"
      end_sample_method="ignore partial sample"
      report_file="grade_control"
      report_format=".not - Surpac Note File"
    }
  }
}]

set status [ SclFunction "CHECK DATABASE CONNECTED" {
  databasesession="GeologyDatabase"
  databasepurpose="drillholes"
  databasehandle="GEOLOGY"
}]

set status [ SclFunction "GET DATABASE HANDLE" {
  sessionType="GeologyDatabase"
  DatabaseHandle="GEOLOGY"
  DatabaseType="drillholes"
  DatabaseName="grade_control"
  result=1
}]

set status [ SclFunction "DRILLHOLE ATTRIBUTES" {
  trace_colour="forest green"
  trace_thickness="1"
  legend_location="no legend"
  table=""
  field=""
  tick_mark_weight="1"
  rescale="true"
  add_constraint="true"
  cylinder_style="no cylinders"
  cylinder_radius="0.000"
  cylinder_maximum="0.0"
  show_collars="true"
  frm00012={
    {
      cons={
        {
          field=""
          operator="="
          value=""
        }
      }
    }
  }
}]

set status [ SclFunction "DRILLHOLE COLLARS" {
  show_collars="true"
  collar_marker="(+)"
  collar_marker_size="0.5"
  position="along path"
  num_rows="0"
}]

set status [ SclFunction "DRILLHOLE GEOLOGY" {
  num_rows="0"
}]

set status [ SclFunction "DRILLHOLE LABELS" {
  tick_length="1.0"
  num_rows="0"
}]

set status [ SclFunction "DRILLHOLE GRAPHS" {
  num_rows="0"
}]

set status [ SclFunction "DRILLHOLE DEPTH MARKERS" {
  position="left"
  offset="5.0"
  decimals="2"
  use_styles="false"
  colour=""
  font_style="Default"
  font_size="1.000"
  font_units="oru"
  alignment="right"
  major="10.0"
  minor="0.0"
  display="false"
  major_length="3.0"
  minor_length="1.0"
}]

set status [ SclFunction "DRILLHOLE APPARENT DIP MARKERS" {
  num_rows="0"
}]

set status [ SclFunction "RECALL ANY FILE" {
  file="grade_control.not"
  mode="openInNewLayer"
}]

########### pause here, wait for user response (say enter key), then proceed
puts ""
puts ""
puts ""
puts ""
puts "End of Macro 07_blast_database.tcl"
puts ""
puts ""
