07-15-2014 10:45 AM
Do you want the closest point in terms of pixel distance or in terms of absolute distance. Since your x and y scales have very different scale, there will be a large difference between the methods.
07-15-2014 10:46 AM
I think pixel distance would suffice for my needs
07-15-2014 10:56 AM
try this...
07-15-2014 12:46 PM
Of course you still need to polish it up, for example you need to add an event for the stop button. Also the subVI code is a bit messy. 😉
07-15-2014 12:55 PM
05-19-2022 08:11 AM
I know it's been like 8 years since this response, but I want to thank you for your incredible yet simple and elegant solution. I've been struggling with this problem for some years and I knew that I should use pixels to find the closest point, but I could never put together a solution.
Just threw off the window half of my code and pasted yours and worked like a charm.
Thank you, mr. Altenbach.