Take a look here:
Draping long components across landscape, including rotation to account for changing terrain elevation? - SketchUp - SketchUp Community