LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

using mouse to draw cicrle

hi,

cuold you tell me how to draw the circle by mouse on xy graph, but in this case the equation to generate cricle is not required. that mean i will change the xy graph from indicator to control status and draw on it.

sincerely,
Tung
0 Kudos
Message 1 of 5
(2,615 Views)
Hey Tung,
    In order to accomplish what you are trying to do, I would suggest looking through some previous discussion forum posts on this exact question:

drawing connected direct lines using the mouse

plotting connected direct lines using the mouse

How do you map a mouse events coordinates to the coordinates of a chart or graph?

Move line on graph with mouse

Draw a circle using a mouse


Brian B
Account Manager
National Instruments
0 Kudos
Message 2 of 5
(2,587 Views)
thank Brian B,

it is not main of my works.
first of all, i change the xy graph from "indicator" to "control" condition. after that i will draw the circles or lines on this graph.  but i do not know how to draw because xy graph is not allow to draw when it is "changed to control" condition.

cuold you tell me how to do for this work,
Tung
0 Kudos
Message 3 of 5
(2,578 Views)


@tungu123 wrote:
first of all, i change the xy graph from "indicator" to "control" condition. after that i will draw the circles or lines on this graph.  but i do not know how to draw because xy graph is not allow to draw when it is "changed to control" condition.

I think you are not understading the basics of a graph. Changing a graph to a control does not magically turn it into a full featured drawing program. 🙂

Have a look at the above quoted examples. Basically you need some code to read mouse-down and mouse-move coordinates, map them to the graph scale, then generate the graph data. You can (and should) leave the graph as an indicator.

Open the example finder an look at example "draw graph with events". Let us know how far you get. Good luck! 🙂

Instead of a graph, you could also use a picture indicator.

If you have a newer LabVIEW version, you can use the "plot images" feature.

Message Edited by altenbach on 02-22-2007 11:14 PM

0 Kudos
Message 4 of 5
(2,567 Views)
thanks Mart,

now i can draw the arbitrary line on the xy graph, and i want to catch the data from points. but i do not know how to get these data. i try it but i only get 1 data on time.
cuold you tell me how to get these data from points which are created by drag the mouse.

here is attachment file,

0 Kudos
Message 5 of 5
(2,534 Views)