the change elevation command allows you to drape a line onto a surface. This creates a node in the line at every triangle crossing. When version 5.20 is released there will be an option to only elevate the verticies of the line.
Linestrings can also be defined by point objects much line a Terramodel set line. When you do this then the line moves with the point objects. You can then elevate the points to the surface and the line follows.