######################################################################
#
# Macro Name    : c:/users/public/gemcom/surpac/614/demo_data/tutorials/plotting/02a_extract_oblique_section.tcl
#
# Version       : Surpac 6.1.5 (Alpha 3)
#
# Creation Date : Thu Jan 13 11:33:24 2011
#
# Description   : 
#
######################################################################



set plot_ed [SclSystemOption get {plot_editor}]
puts "plot editor setting was initially $plot_ed and is now surpac"
SclSystemOption set "plot_editor" "surpac"

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

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

set status [ SclFunction "DRAW Y" {
  frm00089={
    {
      _action=display
      range1=""
      range2=""
      range3=""
      ifld_num="Y"
      textalignment="v"
      position="All points"
      layer_name="oblique_line.str"
    }
  }
}]

set status [ SclFunction "DRAW X" {
  frm00089={
    {
      _action=display
      range1=""
      range2=""
      range3=""
      ifld_num="X"
      textalignment="^"
      position="All points"
      layer_name="oblique_line.str"
    }
  }
}]

set status [ SclFunction "EXTRACT SECTIONS FOR PLOT" {
   _action=display
  frm12008=table { loc secrange nor1 eas1 nor2 eas2 elemin elemax dis1 dis2 rworld depths pldepths sample_tables geology_tables diptable } {
    { "oblique_section" "0" "7160" "1440" "7600" "1920" "-99999" "99999" "20" "20" "N" "10" "0" { 
        {
          sample_table="sample"
        }
      } {
        {
          geology_table="geology"
        }
      } ""}
  }
  frm12009={
    {
      _action=display
      element="Y"
      combass="Y"
      scroll_1={
        {
          field="gold"
          range="0,10,2;999"
          bulk="0"
          ndec="2"
          graph="none"
          barpos=null
          barsize=null
          barmax=null
        }
      }
    }
  }
  frm12011={
    {
      _action=display
      combgeo="Y"
      scroll_1={
        {
          geofield="rock"
          boxpos="left"
          boxsize="5"
        }
      }
    }
  }
  frm00012={
    {
      _action=display
      cons={
        {
          field=""
          operator="="
          value=""
        }
      }
    }
  }
}]

set status [ SclFunction "EXIT GRAPHICS" {} ]

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

set status [ SclFunction "DRAW STRINGS" {
  frm00089={
    {
      _action=display
      range1="33000"
      range2=""
      range3=""
      ifld_num="d1"
      textalignment="<"
      position="First point"
      layer_name="oblique_section0.str"
    }
  }
}]

set status [ SclFunction "IDENTIFY POINT" {
  select_point={
    {
      winx="-0.951"
      winy="-0.539"
      objectx="4.534"
      objecty="4.690"
      objectz="0.057"
    }
  }
}]

set status [ SclFunction "MAP LOAD" {
  frm00224={
    {
      name="map.txt"
    }
  }
}]

set status [ SclFunction "MAP MODIFY" {
  frm00331={
    {
      _action=display
      map_name="OBLIQUE DH SECTION"
    }
  }
  frm00230={
    {
      _action=display
      main=table { entity_name location id_range string_range segment_range } {
        { "DH TRACE" "oblique_section" "0" "1" "" }
        { "DH TRACE NO TOP" "oblique_section" "0" "2" "" }
        { "DH TRACE NO BOT" "oblique_section" "0" "3" "" }
        { "DH TRACE NO TOPBOT" "oblique_section" "0" "4" "" }
        { "DH LABEL" "oblique_section" "0" "5" "" }
        { "DH EOH DEPTH" "oblique_section" "0" "5" "" }
        { "DH ASSAY1 RHS/PN2" "oblique_section" "0" "11" "" }
        { "DH ASSAY1 RHS/PN3" "oblique_section" "0" "12" "" }
        { "DH ASSAY1 RHS/PN4" "oblique_section" "0" "13" "" }
        { "DH ASSAY1 RHS/PN5" "oblique_section" "0" "14" "" }
        { "DH ASSAY1 RHS/PN6" "oblique_section" "0" "15" "" }
        { "DH GEOLOGY LHS" "oblique_section" "0" "70" "" }
      }
    }
  }
}]

set status [ SclFunction "PROCESS MAP" {
  frm00332={
    {
      main={
        {
          _action=display
          map_name="OBLIQUE DH SECTION"
        }
      }
    }
  }
  frm00226={
    {
      _action=display
      outputPrefix="oblique_dh_section"
      uniform_scale="Yes"
      xscale="2000"
      sheet="A3"
      border="BORD"
      drawsp="DRAW"
      grid="OBA3"
      title="NMA3"
      orient="NC"
      quad="NE"
      unit="M"
      over="N"
      txtrot="Y"
      display_plot="Y"
      oblique_grid_style="OBLIQUE SECTION TWO LABELS"
      oblique_grid_string="33000"
      oblique_grid_file="oblique_section0.str"
      display_oblique_section_grid="Y"
      oblique_ygli="100"
      oblique_yline="T"
      oblique_xgli="100"
      oblique_xline="T"
    }
  }
  frm00232={
    {
      _action=display
      line1="Oblique Section"
      line2="From 7160N 1440E"
      line3="To 7600N 1920E"
    }
  }
  frm00219={
    {
      _action=display
      ygli="100"
      yline="F"
      xgli="100"
      xline="F"
    }
  }
}]

set status [ SclFunction "TOOL MODE TRADITIONAL" {} ]

set status [ SclFunction "WINDOW INPLOT" {
  window_drag={
    {
      winx1="-0.718"
      winy1="-0.615"
      winx2="-0.382"
      winy2="-0.265"
      objectx1="4.570"
      objecty1="4.003"
      objectz1="0.000"
      objectx2="11.196"
      objecty2="8.855"
      objectz2="0.000"
    }
  }
}]

set status [ SclFunction "TOOL MODE TRADITIONAL" {} ]

set status [ SclFunction "TOOL CANCEL CURRENT" {} ]

SclPause 2

set status [ SclFunction "EXIT PLOT_PREVIEW" {} ]

puts ""
SclSystemOption set plot_editor $plot_ed
puts "plot editor setting is now reset to $plot_ed"
puts  ""
puts  ""
puts  "Macro 05c_extract_oblique_section.tcl completed."
puts  ""
