Get Distance Full Function

Function to find the distance between two nodes and the overall distance vector

This script uses pythagoras therom in 3 dimensinal space to find the vector, x, y and z distance between two nodes or user-defined points.

The function works by:
• Supplying two nodes or points, and a third argument of true or false.
• The function will return the 4 separate distance values:
• Distance in x,
• Distance in y,
• Distance in z,
• Overall distance vector between the two points.

• If third argument is true, script will return vector distance without using pythagoras.
• If the third argument is false, script will return the vector distance caluclated using pythagoras.

In the example, the user is prompted to select two nodes in the model,  and the distance between the nodes are subsequently displayed in the dialogue box (root value is set to false).