Finding distance between multi points or Two points

Hi There,

Is there a way to find the minimum distance between two points or multi points (Two Snap points of two different Revit elements/ space points)? Right Now, I could not able to get snap points through the attached code. Please suggest
Capture