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

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

set status [ SclFunction "PICK SEGMENT" {
  prompt="Pick a road centreline"
  select_point={
    {
      winx="0.050"
      winy="0.424"
      objectx="19053.580"
      objecty="57543.226"
      objectz="5130.012"
    }
  }
}]

set status [ SclFunction "CREATE ROAD OUTLINE" {
  dataset="final_centreline_design.str"
  string="7"
  segment="0"
  output_string="8"
  leftWidth="5"
  rightWidth="5"
  join_start_of_road="1"
  join_end_of_road="1"
  use_right_width_field="0"
  use_chainage_field="1"
  use_super_elevation_field="1"
  use_left_width_field="0"
}]
set status [ SclFunction "TOOL MODE TRADITIONAL" {} ]

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

set status [ SclFunction "CLEAN STRING" {
  frm00605={
    {
      _action=display
      operation="Duplicate Point"
      dup_pnts_action="remove"
      dup_pnts_target="string"
      dup_pnts_dist_min="0"
      dup_pnts_dist="1.0"
      dimension="2D"
    }
  }
  select_point={
    {
      winx="-0.513"
      winy="0.148"
    }
  }
}]

set status [ SclFunction "CLEAN STRING" {
  frm00605={
    {
      _action=display
      operation="Spikes"
      spike_action="remove"
      spike_angle="5"
      dimension="2D"
    }
  }
  select_point={
    {
      winx="-0.516"
      winy="-0.122"
    }
  }
}]

set status [ SclFunction "CLEAN STRING" {
  frm00605={
    {
      _action=display
      operation="Cross-overs"
      cross_action="mark"
      cross_target="string"
      cross_arg="all"
      dimension="2D"
      markerColour="red"
    }
  }
  select_point={
    {
      winx="-0.565"
      winy="-0.109"
    }
  }
}]

set status [ SclFunction "FILE SAVE" {
  frmsaveFileAs={
    {
      _action=display
      AutoCAD={
        version="Autocad 18"
      }
      output_file="surpac2str:final_road_outline"
      outputExt=".str"
      saveStyle="N"
      Datamine={
        binary_precision="Single"
      }
      Surpac={
        FileFormat="text"
        ForceValidation="true"
        Purpose=""
        ForceCompatibility="true"
        range="8"
      }
      output_type="Surpac String Files"
    }
  }
  frm00121={
    {
      _action="apply"
    }
  }
}]

puts ""
puts ""
puts "macro 2h_create_road_outline.tcl sucessfully completed."
puts ""