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

set status [ SclFunction "BM EXIT" {
  frm20103={
    {
      exit_mode="E"
    }
  }
}]

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

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

for {set i 1} {$i<4} {incr i} {
  puts "Creating report: realization$i.csv"
  
set status [ SclFunction "BM VOL TON REPORT" {
  frm20104={
    {
      _action=display
      fname=""
      report_name="realization$i"
      report_format=".csv - Comma Separated (Spreadsheet)"
      ik_cutoffs="No"
      ikMeanGrade="cutoffMean"
      constrain="Yes"
    }
  }
  frm20195={
    {
      _action=display
      rpt_desc_1=""
      report_attributes=table { rpt_attribute rpt_display low_cut upper_cut rpt_attribute_wt rpt_attribute_avg rpt_expression } {
        { "realization$i" "Yes" null null "Mass" "Average" null }
      }
      use_vol="No"
      Format_head="Yes"
      fillAllCells="No"
      cullEmpty="No"
      volDecimals="0 decimal places"
      geometryType="None"
      vol_mult_factor="Value"
      mult_factor_value="2"
      group_attributes={
        {
          group_field="realization$i"
          numeric_range="0,15;999"
        }
      }
    }
  }
  frm20111={
    {
      constraints=table { not op contype location id rnga rngb lbound ubound ext } {
        { "" "INSIDE" "CONSTRAINT" "SIM_OREZONE1" "" "" "" "" "" "" }
        { "" "" "" "" "" "" "" "" "" "" }
        { "" "" "" "" "" "" "" "" "" "" }
        { "" "" "" "" "" "" "" "" "" "" }
        { "" "" "" "" "" "" "" "" "" "" }
        { "" "" "" "" "" "" "" "" "" "" }
        { "" "" "" "" "" "" "" "" "" "" }
        { "" "" "" "" "" "" "" "" "" "" }
        { "" "" "" "" "" "" "" "" "" "" }
        { "" "" "" "" "" "" "" "" "" "" }
        { "" "" "" "" "" "" "" "" "" "" }
        { "" "" "" "" "" "" "" "" "" "" }
        { "" "" "" "" "" "" "" "" "" "" }
        { "" "" "" "" "" "" "" "" "" "" }
        { "" "" "" "" "" "" "" "" "" "" }
        { "" "" "" "" "" "" "" "" "" "" }
        { "" "" "" "" "" "" "" "" "" "" }
        { "" "" "" "" "" "" "" "" "" "" }
        { "" "" "" "" "" "" "" "" "" "" }
        { "" "" "" "" "" "" "" "" "" "" }
        { "" "" "" "" "" "" "" "" "" "" }
        { "" "" "" "" "" "" "" "" "" "" }
        { "" "" "" "" "" "" "" "" "" "" }
        { "" "" "" "" "" "" "" "" "" "" }
        { "" "" "" "" "" "" "" "" "" "" }
        { "" "" "" "" "" "" "" "" "" "" }
      }
      conexp=""
      confile=""
      keep_blocks="N"
    }
  }
}]

}


catch {set status [ SclFunction "RECALL ANY FILE" {
  file="SGSIM_grade_tonnage.xls"
  mode="openInNewLayer"
}]}

puts ""
puts ""
puts "macro 2d_12f_simulation_report.tcl completed"
puts ""