set status [ SclFunction "EXIT GRAPHICS" {}]

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

set status [ SclFunction "VIEW BY BEARING" {
  frm00289={
    {
      bearing="70"
      dip="-20"
    }
  }
}]

set status [ SclFunction "EDGES ON" {}]

set form {
  GuidoForm form_1 {
    -default_buttons
    -label "Create block model"
    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 {
      -height 8
      -width 50
        GuidoTextArea text_1 {
        -wrap_style_word true
        -linewrap true
        -input true
        -font_highlight 0 0 0
        -default "
Next, a block model will be created and constrained to those blocks which are entirely or partially within ore_solid1.dtm, currently displayed in graphics.

Since the concepts of creating and constraining a block model are available in a separate tutorial, these points will not be covered here.
"
        }
      }
      GuidoLabel space {
      -height 0.5
      }
    }
  }
}

SclCreateGuidoForm form_handle $form {
}

$form_handle SclRun {
}

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

file delete -force geostats_example.mdl
file delete -force qv1.con

set status [ SclFunction "BLOCK MODEL OPEN" {
  frm00906={
    {
      modname="geostats_example"
      use_const="N"
    }
  }
  frm20020={
    {
      _action="apply"
    }
  }
  frm20025={
    {
      description=""
      invoke_mode=""
      method="minMax"
      extentsType="N"
      yorg="7100"
      xorg="1400"
      zorg="0"
      yext="7600"
      xext="2000"
      zext="250"
      yblk="10"
      xblk="10"
      zblk="10"
      bearing="0"
      dip="0"
      plunge="0"
      xrot=""
      yrot=""
      zrot=""
      subBlockingType="Standard"
      maxres="10,10,10"
      save_audit="Y"
    }
  }
  frm20026={
    {
      move_extents="7600,2000,260  - 1245 blocks will be created"
      moved="No"
      res=""
    }
  }
}]

set status [ SclFunction "BM GRAPHICS DRAW" {
  frm20503={
    {
      display="normal"
      constraint="N"
      slice="N"
      rescale="N"
      all_blocks="N"
      cloud_marker="."
      cloud_size="1"
    }
  }
}]

set status [ SclFunction "3D GRID" {
  frm00140={
    {
      ygrid_inc="100"
      ylabel_inc="1"
      xgrid_inc="100"
      xlabel_inc="1"
      zgrid_inc="50"
      zlabel_inc="1"
      maximum=""
      minimum=""
    }
  }
}]

set status [ SclFunction "FACES OFF" {}]

set status [ SclFunction "ZOOM FACTOR" {
  frm00326={
    {
      zoom_factor="1.2"
    }
  }
}]

set status [ SclFunction "ZOOM OUT" {} ]


set status [ SclFunction "ZOOM FACTOR" {
  frm00326={
    {
      zoom_factor="2"
    }
  }
}]

set status [ SclFunction "BM GRAPHICS CONSTRAIN ADD" {
  frm20111={
    {
      constraints=table { not op contype location id rnga rngb lbound ubound ext } {
        { "" "INSIDE" "3DM" "ore_solid" "1" "" "" "" "" "" }
        { "" "" "" "" "" "" "" "" "" "" }
        { "" "" "" "" "" "" "" "" "" "" }
        { "" "" "" "" "" "" "" "" "" "" }
        { "" "" "" "" "" "" "" "" "" "" }
        { "" "" "" "" "" "" "" "" "" "" }
        { "" "" "" "" "" "" "" "" "" "" }
        { "" "" "" "" "" "" "" "" "" "" }
        { "" "" "" "" "" "" "" "" "" "" }
        { "" "" "" "" "" "" "" "" "" "" }
        { "" "" "" "" "" "" "" "" "" "" }
        { "" "" "" "" "" "" "" "" "" "" }
        { "" "" "" "" "" "" "" "" "" "" }
        { "" "" "" "" "" "" "" "" "" "" }
        { "" "" "" "" "" "" "" "" "" "" }
        { "" "" "" "" "" "" "" "" "" "" }
        { "" "" "" "" "" "" "" "" "" "" }
        { "" "" "" "" "" "" "" "" "" "" }
        { "" "" "" "" "" "" "" "" "" "" }
        { "" "" "" "" "" "" "" "" "" "" }
        { "" "" "" "" "" "" "" "" "" "" }
        { "" "" "" "" "" "" "" "" "" "" }
        { "" "" "" "" "" "" "" "" "" "" }
        { "" "" "" "" "" "" "" "" "" "" }
        { "" "" "" "" "" "" "" "" "" "" }
        { "" "" "" "" "" "" "" "" "" "" }
      }
      conexp=""
      confile="qv1"
      keep_blocks="Y"
    }
  }
  frm00121={
    {
      _action="apply"
    }
  }
}]

set form {
  GuidoForm form_2 {
    -default_buttons
    -label "Create block model"
    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 {
      -height 15
      -width 80
        GuidoTextArea text_2 {
        -wrap_style_word true
        -linewrap true
        -input true
        -font_highlight 0 0 0
        -default "
The following attributes will be used to compare the effect of applying an anisotropic search ellipsoid against using an isotropic search:

1) anisotropic_kriged_gold - the estimated value using the major axis variogram model and the anisotropy ellipsoid previously determined

2) isotropic_kriged_gold - the estimated value using the major axis variogram model and an isotropic search

3) aniso_iso_diff - The difference between the values: anisotropic_kriged_gold - isotropic_kriged_gold

4) qv1_partial_percent - a value between 0 and 1 which represents the percentage of the block contained within the QV1 ore zone - ore_solid1.dtm


Review, but do not modify the values on the next form and press APPLY.
"
        }
      }
      GuidoLabel space {
      -height 0.5
      }
    }
  }
}

SclCreateGuidoForm form_handle $form {
}

$form_handle SclRun {
}

set status [ SclFunction "BM ADD ATTRIBUTE" {
  frm20150={
    {
      _action=display
      attributes=table { name type decimals bgv description } {
        { "anisotropic_kriged_gold" "float" "2" "-1" "" }
        { "isotropic_kriged_gold" "float" "2" "-1" "" }
        { "aniso_iso_diff" "calculated" "3" "0" "anisotropic_kriged_gold-isotropic_kriged_gold" }
        { "qv1_partial_percent" "float" "3" "0" "" }
      }
    }
  }
}]

set status [ SclFunction "CHECK BM CONNECTED" {} ]

set status [ SclFunction "BM REORDER ATTRIBUTES" {
  orderType="User Defined"
  numAttNames="4"
  att={
    "anisotropic_kriged_gold"
    "isotropic_kriged_gold"
    "aniso_iso_diff"
    "qv1_partial_percent"
  }
}]

set status [ SclFunction "BM SAVE MODEL" {} ]

set status [ SclFunction "FACES ON" {}]

puts ""
puts ""
puts " macro _09_create_block_model.tcl completed"
puts ""



