01-15-2015 07:45 AM
I am able to extract coordinates using mouse down and mouse up event structure but unable to draw the rectangle at the specified positions.I am getting coordinates at mouse down and mouse up event in these bounds.I want to draw a rectangle at the position of coordinates but unable to do so.
Solved! Go to Solution.
01-15-2015 11:56 AM - edited 01-15-2015 12:07 PM
@sets wrote:
I am able to extract coordinates using mouse down and mouse up event structure but unable to draw the rectangle at the specified positions.I am getting coordinates at mouse down and mouse up event in these bounds.I want to draw a rectangle at the position of coordinates but unable to do so.
The rectangle will draw in front of the data layer. You need to add data to the graph first.
EDIT: Use the coordinates, not the XY values.
Ben64
01-17-2015 06:20 AM
still not working....
01-17-2015 06:57 AM
01-17-2015 09:15 AM
cannot open your VI ....please save it for previous version labview 2011
01-17-2015 11:18 AM
01-17-2015 12:11 PM
You need to account for the plot bounds. See my example (posted here) long ago.
01-18-2015 07:54 AM
One more thing, since you're using the Draw Rectangle function you need to deal with the cases where the rectangle is not drawn from top left to bottom right. You have to make sure the minimum X value goes to the LEFT input and the minimum Y value goes to the TOP input of the rect terminal of the Draw Rectangle vi. Use the Max & Min function from the comparison palette for this.
Ben64
01-20-2015 09:43 AM
Thanks alot......understood it.