
set status [ SclFunction "PICK VIEWPORT" {
  prompt="Pick the viewport that contains the road profile"
  viewport_selected="00002"
}]

set status [ SclFunction "PICK SEGMENT" {
  prompt="Pick a Road Profile"
  select_point={
    {
      winx="-0.527"
      winy="-0.196"
      objectx="433.967"
      objecty="-0.004"
      objectz="5144.213"
    }
  }
  dataset="longitudinal profile"
  string="6"
  segment=0
  selected=true
}]

set status [ SclFunction "PICK VIEWPORT" {
  prompt="Pick the viewport that contains the horizontal design"
  viewport_selected="00001"
}]

set status [ SclFunction "PICK SEGMENT" {
  prompt="Pick a Horizontal Design to apply this to"
  select_point={
    {
      winx="-0.084"
      winy="0.353"
      objectx="18853.869"
      objecty="57449.995"
      objectz="5128.065"
    }
  }
  dataset="design_centreline_draped.str"
  string="3"
  segment=0
  selected=true
}]

set status [ SclFunction "APPLY LONGITUDINAL PROFILE" {
  profile_dataset="longitudinal profile"
  profile_string="6"
  profile_segment="0"
  elevation_axis="Z"
  target_dataset="design_centreline_draped.str"
  target_string="3"
  target_segment="0"
  use_chainage_field="1"
}]

set status [ SclFunction "STRING RENUMBER RANGE" {
  frm00068={
    {
      _action=display
      old_str_range="3"
      new_str_range="7"
    }
  }
}]


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

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