######################################################################
#
# Macro Name    : c:/gemcom/surpac/surpacv6.1/tutorials/block_modelling/data/_14_thickness.tcl
#
# Version       : Surpac 6.1.4
#
# Creation Date : Wed Oct 13 13:06:49 2010
#
# Description   : 
#
######################################################################

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

set status [ SclFunction "BM THICKNESS" {
  frm20335={
    {
      ore_att="ore_waste_flag"
      ore_val="1"
      attributes={
        {
          quality="diluted_grade"
        }
      }
      str_loc="ore_thickness"
      str_id="12"
      axis="-Z"
      constrain="Yes"
      fname="thickness_report"
      report_format=".not - Surpac Note File"
    }
  }

  frm00121=table { _action } {
    { "apply" }
  }

  frm20111={
    {
     _action="display"
      constraints=table { not op contype location id rnga rngb lbound ubound ext } {
        { "NOT" "ABOVE" "DTM" "top_ore1.dtm" "" "1" "1" "" "" "" }
        { "" "ABOVE" "DTM" "bot_ore12.dtm" "" "1" "1" "" "" "" }
        { "" "" "" "" "" "" "" "" "" "" }
        { "" "" "" "" "" "" "" "" "" "" }
        { "" "" "" "" "" "" "" "" "" "" }
        { "" "" "" "" "" "" "" "" "" "" }
        { "" "" "" "" "" "" "" "" "" "" }
        { "" "" "" "" "" "" "" "" "" "" }
        { "" "" "" "" "" "" "" "" "" "" }
        { "" "" "" "" "" "" "" "" "" "" }
        { "" "" "" "" "" "" "" "" "" "" }
        { "" "" "" "" "" "" "" "" "" "" }
        { "" "" "" "" "" "" "" "" "" "" }
        { "" "" "" "" "" "" "" "" "" "" }
        { "" "" "" "" "" "" "" "" "" "" }
        { "" "" "" "" "" "" "" "" "" "" }
        { "" "" "" "" "" "" "" "" "" "" }
        { "" "" "" "" "" "" "" "" "" "" }
        { "" "" "" "" "" "" "" "" "" "" }
        { "" "" "" "" "" "" "" "" "" "" }
        { "" "" "" "" "" "" "" "" "" "" }
        { "" "" "" "" "" "" "" "" "" "" }
        { "" "" "" "" "" "" "" "" "" "" }
        { "" "" "" "" "" "" "" "" "" "" }
        { "" "" "" "" "" "" "" "" "" "" }
        { "" "" "" "" "" "" "" "" "" "" }
      }
      conexp=""
      confile=""
      keep_blocks="N"
    }
  }
}]

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

set status [ SclFunction "STRING DELETE RANGE" {
  frm00066={
    {
      _action="display"
      strange="2"
    }
  }
}]

set status [ SclFunction "FILE SAVE" {
  frmsaveFileAs={
    {
      AutoCAD={
        version="Autocad 18"
      }
      output_file="surpac2str:ore_thickness12"
      outputExt=".str"
      Datamine={
        binary_precision="Single"
      }
      Surpac={
        FileFormat="text"
        ForceValidation="true"
        Purpose="Block Model Ore/Waste Thickness"
        ForceCompatibility="true"
        range=""
      }
      output_type="Surpac String Files"
    }
  }
  frm00121={
    {
      _action="apply"
    }
  }
}]

set status [ SclFunction "CREATE DTM" {
  frm00126={
    {
      _action="display"
      location="ore_thickness12"
      break="N"
      bdyloc=""
      interpolate_new_points="N"
      bdystr="1"
      spotrng=""
      object_num="1"
      obj_name=""
      check_distance="0.0050"
      anyspots="N"
      inout="I"
      brktest="N"
      apply_boundary="N"
      interpolate_new_points_distance="50"
    }
  }
}]

set status [ SclFunction "EXTRACT CONTOUR" {
  frm04949={
    {
      _action="display"
      indloc=""
      dtmfld="D1"
      cloc="contour_thickness"
      conrng="21.000,69.000,1"
      index="N"
      dtmloc="ore_thickness12"
      ci="2.5"
      annloc=""
      deftype="I"
      ptrange=""
      conmin="21.000"
      trisolation_id="1"
      conmax="69.000"
      valind="0"
      object_id="1"
      contval="N"
    }
  }
}]

set status [ SclFunction "EXIT GRAPHICS" {} ]

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

puts ""
puts ""
puts "macro _14_thickness.tcl completed"
puts ""