Hello Jose, From the mbdyn documentation, the direction of the in line is given by the direction 3 of the orientation matrix. (Sextion 8.12.25) And the orientation matrix can be defined as Dir1,x,y,z,dir2, guess In this case dir1 should be 3 And x=xp1-xp2, y=yp1-yp2, z=zp1-zp2 And dir2 could be 1 or 2