
set form {
  GuidoForm form_1 {
    -default_buttons
    -label "Create downhole composites"
    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 6
      -width 75
        GuidoTextArea text_1 {
        -wrap_style_word true
        -linewrap true
        -input true
        -font_highlight 0 0 0
        -default "
A geostatistical analysis of data in a drillhole database generally starts with compositing a sample value within a given geological zone.

In this example, we will be creating 2 meter downhole composites within the QV1 geological code."
        }
      }
      GuidoLabel space {
      -height 0.5
      }
    }
  }
}

SclCreateGuidoForm form_handle $form {
}

$form_handle SclRun {
}




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

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

set status [ SclFunction "COMPOSITE DOWNHOLE" {
  frm12004={
    {
      _action=display
      loc="gold_comp"
      rid="2"
      istr="1"
      comp_len="2"
      comp_min="50"
      selection="MULTIPLE ZONES"
      dilution="N"
      table="sample"
      composite_fields={
        {
          composite_field="gold"
        }
      }
      weighting_fields={
        {
          weighting_field=""
          weighting_default="1"
          weighting_limit=""
        }
      }
    }
  }
  frm00613={
    {
      _action=display
      optional_tables={
        {
          table_name="geology"
          field_name="lithology"
          specification="QV1"
        }
      }
      int_from="1"
      int_to="999"
    }
  }
  frm00012={
    {
      cons={
        {
          field=""
          operator="="
          value=""
        }
      }
    }
  }
}]

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

set status [ SclFunction "CLEAR SCREEN" {} ]

set status [ SclFunction "DRAW MARKERS" {
  frm00089={
    {
      range1=""
      range2=""
      range3=""
      ifld_num="d1"
      textalignment="<"
      position="All points"
      legend_location="no legend"
      layer_name="gold_comp2.str"
    }
  }
}]

set status [ SclFunction "DRAW DESC" {
  frm00089={
    {
      range1=""
      range2=""
      range3=""
      ifld_num="d1"
      textalignment="<"
      position="All points"
      legend_location="no legend"
      layer_name="gold_comp2.str"
    }
  }
}]

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

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"
  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" {
  tbl={
    "geology"
  }
  fld={
    "lithology"
  }
  position={
    "left"
  }
  size={
    "1.0"
  }
  offset={
    "0.0"
  }
  num_rows="1"
}]

set status [ SclFunction "DRILLHOLE LABELS" {
  tick_length="1.0"
  tbl={
    "geology"
  }
  fld={
    "lithology"
  }
  position={
    "left"
  }
  offset={
    "3"
  }
  decimals={
    "-1"
  }
  use_styles={
    "true"
  }
  colour={
    ""
  }
  font_style={
    "Default"
  }
  font_size={
    "1.0"
  }
  font_units={
    "oru"
  }
  alignment={
    "right"
  }
  combine={
    "true"
  }
  num_rows="1"
}]

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 "ZOOM ALL" {} ]

set status [ SclFunction "ZOOM ALL" {} ]

set status [ SclFunction "SLICING PLANES" {
  frm00298={
    {
      forward="20"
      backward="20"
      method="Northing"
      plane_thickness=""
      step_distance="20"
      value="7000,7600,40"
      sectionBlockModel="N"
      block_layer="block sections"
      tolerance="0"
      section_objects="N"
      object_range=""
      object_layer="object sections"
      confirm_line_ends="N"
      interval_range="range"
      colour_fill_bm_sections="N"
      zoom_plane="Y"
      view_limits="N"
      display_planes="N"
      use_interactive="N"
      colour_method="No change"
      trace_colour="jungle green"
    }
  }
}]

set status [ SclFunction "VIEWING PLANES FORWARD" {} ]

set status [ SclFunction "VIEWING PLANES FORWARD" {} ]

set status [ SclFunction "VIEWING PLANES FORWARD" {} ]

set status [ SclFunction "VIEWING PLANES FORWARD" {} ]

set status [ SclFunction "VIEWING PLANES FORWARD" {} ]

set status [ SclFunction "VIEWING PLANES FORWARD" {} ]

set status [ SclFunction "VIEWING PLANES FORWARD" {} ]

set status [ SclFunction "WINDOW IN" {
  window_drag={
    {
      winx1="-0.177"
      winy1="-0.196"
      winx2="0.072"
      winy2="0.084"
      objectx1="1584.563"
      objecty1="7271.038"
      objectz1="69.162"
      objectx2="1634.221"
      objecty2="7271.038"
      objectz2="100.926"
    }
  }
}]

set form {
  GuidoForm form_2 {
    -default_buttons
    -label "Create downhole composites"
    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 9
      -width 75
        GuidoTextArea text_2 {
        -wrap_style_word true
        -linewrap true
        -input true
        -font_highlight 0 0 0
        -default "
2 meter downhole composites have been created within the QV1 rock type, and are stored in the D1 field in gold_comp2.str.

String 1 contains composites where 50% to 100% of the 2m length contained a gold value.
String 2 contains composites where less than 50% of the 2m length contained a gold value.

Either or both of these strings may be used for further geostatistical analysis.  In this example, we will use both strings.
"
        }
      }
      GuidoLabel space {
      -height 0.5
      }
    }
  }
}

SclCreateGuidoForm form_handle $form {
}

$form_handle SclRun {
}

puts  ""
puts  ""
puts  "Macro 07_create_downhole_composites.tcl completed."
puts  ""
