Example Code

Draw in XYGraph

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.

    Software

  • LabVIEW

Code and Documents

Attachment

Overview

This is an example of how can you use the XY Graph to draw with your mouse on it. The mouse movement generate an event to draw, and a left click erase the graph.

Description

This is an example of how can you use the XY Graph to draw with your mouse on it. The mouse movement generate an event to draw, and a left click erase the graph. I used a dll to acquire the position of the pointer to obtain the X and Y position, and save all the point in an array and show them in the Graph.

You can upgrade this example to do something more complex.

 

Requirements

  • LabVIEW 2012 (or compatible)

 

Steps to Implement or Execute Code

  1. Run the VI.
  2. Move mouse inside the pane (XY Graph) to draw its track.
  3. Left click mouse to erase graph.

 

Additional Information or References  

VI Snippet

1.png

 

 

 **This document has been updated to meet the current required format for the NI Code Exchange.**

Jaime Peña
National Instruments Mexico
Ingeniería de Aplicaciones
www.ni.com/soporte

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.

Comments
Harlequinade
Member
Member
on

Could you maybe downconvert this example to a lower version, as not everyone has upgraded yet to LV 2011?

james88
NI Employee (retired)
on

This es an example of how can you use the XY Graph to draw with your mouse on it. The mouse movement generate an event to draw, and a rigth click erase the graph. I used a dll to acquire the position of the pointer to obtain the X and Y position, and save all the point in an array and show them in the Graph.

You and upgrade this example to do something more complex.

Regards

Jaime Peña
National Instruments Mexico
Ingeniería de Aplicaciones
www.ni.com/soporte