Measure minimum distance from 800 points to spline

Hello everyone,

I need to know if there is a quick way to create a Macro to measure the "minimum distance" from a point cloud (points 1 to 806) to a spline and save the data to a file?

Note: The point cloud is the actual CMM measurement of the spline.

Thanks,

Art

I am using SW2014 SP0.

SolidworksApi macros