Real-time distance measurement between the needle tip and target with PlusToolkit and 3D Slicer

Andras and Csaba, thank you for your help! Yes, these are exactly two things what i’m looking for: (1) the python solution and (2) the simple measurement visualization in 3d view.
Quick question: how to assign NeedleToRAS? This was somewhere in the tutorial. However, I can’t find it now.
Thanks.