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

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

set status [ SclFunction "PICK SEGMENT" {
  prompt="Pick a segment to create a profile from"
  select_point={
    {
      winx="-0.010"
      winy="0.337"
      objectx="18996.049"
      objecty="57476.245"
      objectz="5140.415"
    }
  }
  dataset="design_centreline_draped.str"
  string="3"
  segment=0
  selected=true
}]

set status [ SclFunction "CREATE LONGITUDINAL PROFILE" {
  source_dataset="design_centreline_draped.str"
  source_string="3"
  source_segment="0"
  output_layer="longitudinal profile"
  output_string="4"
  elevation_axis="Z"
  view_scale_factor="1.0"
  enable_plane_mode="1"
  use_chainage_field="1"
}]

set status [ SclFunction "SELECT LAYER" {
  activelayer="longitudinal profile"
}]


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

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