Wojciech:
You can do what you wish as follows:
Alternate 1 - this is the more laborious method, but the most flexible.
- Create the line string as you have already described. I would suggest that you consider using the civil geometry line or curve tools so that you get the advantage of rules based design and preservation of design intent, but a line string will work fine.
- Select the line string and open its profile view.
- If the terrain you are working with is the active terrain then the terrain profile will already show in the profile view. If not, then use profile from surface to draw it. Having the terrain profile shown is only important only for reference, perhaps, so it may not be necessary.
- Now, using the civil geometry profile tools make a profile for the line string. Based on your description, Profile Line Between Points will do what you want, but you can make as complex a profile as is necessary.
- Make the new profile the active profile.
Alternate 2
- SInce you are working in 3D model with a terrain, create the linestring in 3D by snapping the ends of the linestring to terrain vertex.
- Now your linestring is a 3D linestring with a slope between the two snapped points.
- Add the linestring as a breakline.