######################################################################
#
# Macro Name    : d:/tutorials/surpac_v5.1/underground_ring_design/data_work/01_create_centreline.tcl
#
# Version       : Surpac Vision V5.1-E
#
# Creation Date : Mon Feb 27 14:18:56 2006
#
# Description   : 
#
######################################################################

file delete -force cl1.str

set status [ SclFunction "EXIT GRAPHICS" {
  frm70042={
    {
      _action="apply"
    }
  }
}]


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

set status [ SclFunction "CREATE POINT" {
  frm00474=table { istr ynew xnew znew desc } {
    { "10" "21646.117" "11446.58" "1055" "" }
    { "10" "21692.233" "11533.051" "1055" "" }
  }
}]

set status [ SclFunction "SAVE FILE AS" {
  output_file="cl1.str"
  output_type="Surpac String Files"
  output_filenames=""
  Surpac={
    Purpose=""
    range=""
    FileFormat="text"
    ForceValidation="true"
    ForceCompatibility="true"
  }
  frm00121={
    {
      _action="apply"
    }
  }
}]

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

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

set status [ SclFunction "GRAPHICS CREATE DTM" {
  frm01311={
    {
      breaktest="Y"
      interpolate_new_points="N"
    }
  }
}]

set status [ SclFunction "SAVE FILE AS" {
  output_file="floor1055.dtm"
  output_type="Surpac DTM Files"
  output_filenames="floor1055.dtm,floor1055.str"
  Surpac={
    Purpose=""
    range=""
    FileFormat="text"
    ForceValidation="true"
    ForceCompatibility="true"
  }
  frmSaveMultipleFiles={
    {
      _action="apply"
    }
  }
}]

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

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

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

set status [ SclFunction "SECTION" {} ]

puts ""
puts ""
puts ""
puts "Click in graphics to continue."
puts ""
puts ""

SclPause

puts ""
puts ""
puts ""
puts ""


set status [ SclFunction "STRING OVER DTM" {
  select_point={
    {
      winx="-0.042"
      winy="0.044"
      objectx="11487.954"
      objecty="21668.179"
      objectz="1056.176"
    }
  }
  frm01313={
    {
      dtm_layer="floor1055.str"
      interp="Y"
    }
  }
}]

set status [ SclFunction "SECTION" {} ]

set status [ SclFunction "CLEAR SCREEN" {} ]

set status [ SclFunction "DRAW STRINGS" {
  frm00089={
    {
      range1=""
      range2=""
      range3=""
      ifld_num="d1"
      textalignment="<"
      position="First point"
      legend_location="no legend"
      layer_name="cl1.str"
    }
  }
}]

puts ""
puts ""
puts ""
puts "Click in graphics to continue."
puts ""
puts ""

SclPause

puts ""
puts ""
puts ""
puts ""


set status [ SclFunction "GRAPHICS STR MATHS" {
  frm00702={
    {
      _action=display
      strrange="N"
      main=table { str_range constraint field expr } {
        { null "" "z" "z+2" }
        { null "" "" "" }
        { null "" "" "" }
        { null "" "" "" }
        { null "" "" "" }
        { null "" "" "" }
        { null "" "" "" }
        { null "" "" "" }
        { null "" "" "" }
        { null "" "" "" }
      }
    }
  }
  select_point={
    {
      winx="0.319"
      winy="-0.141"
      objectx="11503.980"
      objecty="21676.711"
      objectz="1051.205"
    }
  }
}]

set status [ SclFunction "SAVE FILE AS" {
  output_file="cl1.str"
  output_type="Surpac String Files"
  output_filenames=""
  Surpac={
    Purpose=""
    range=""
    FileFormat="text"
    ForceValidation="true"
    ForceCompatibility="true"
  }
  frm00121={
    {
      _action="apply"
    }
  }
}]

set status [ SclFunction "DRAW OBJECTS" {
  frm00089={
    {
      range1=""
      range2=""
      range3=""
      ifld_num="d1"
      textalignment="<"
      legend_location="no legend"
      layer_name="floor1055.str"
    }
  }
}]
puts ""
puts ""
puts ""
puts "End of macro 01_create_centreline.tcl"
puts ""
puts ""
