there are a couple of ways, some depend on the environment. is this free open space where the line can go in any direction?
the easy way is to use the 'point object', 'move object' commands.
if it is on a surface, use sin/cos
going from point 1 towards point 2, first get the angle.
you could do it with maths, but assuming you are trying to move/position an object along this line we can take a short cut:
point object someobject,point2.x,point2.y,point2.z
Yangle# = object angle y(someobject)
then calculate the new position:
newx# = point1.x + sin(Yangle#)*distance#
newz# = point1.z + cos(Yangle#)*distance#
the new Y position will need to get the ground height at newx#,newz# if it is on a terrain or something, if it's just a flat plane then there is no change.