LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Polygon input from user through front panel in runtime

Hello!

I am trying to find a way to take a polygon as an input from the front panel. There are two parts to the problem, first is to take the 'hand-drawn' image from the user through the front panel and second is to convert it in a polygon. How can i do the first? I can't find any option in the graph/2Dpicture properties. 

 

Thanks!

0 Kudos
Message 1 of 3
(799 Views)

Hi Robin,

 


@Robin_507 wrote:

I am trying to find a way to take a polygon as an input from the front panel. There are two parts to the problem, first is to take the 'hand-drawn' image from the user through the front panel and second is to convert it in a polygon. How can i do the first? I can't find any option in the graph/2Dpicture properties. 


What have you tried so far? Where are you stuck?

 

When it is about graphs:

  • They support cursors so you could use a cursor to have a user move and set it. You can read cursor properties all the time…
  • You can always use an event structure to handle mouse movements/button actions for a certain control like a graph…

 

When it is about basic frontpanels: use the event structure to handle mouse movement/button events…

 

In the end you should know the coordinates of interest: what is the your problem to create a polygon from coordinates?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 3
(768 Views)

Here is an ancient example using an XY graph and cursors.  You click in the graph to add a new point and can drag the existing points around.

 

https://forums.ni.com/t5/LabVIEW/How-to-select-a-set-of-points-in-a-xy-graph-contained-in-an-area/m-...

0 Kudos
Message 3 of 3
(735 Views)