Example Code

Draw a Circle with the Mouse on a Drawing Pad in LabVIEW

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
To allow you to draw a circle in a designated region of the front panel using the mouse

Description:
This VI uses property nodes to allow you to draw a circle in a designated region of the front panel using the mouse.  It will also allow you to change to colors of the circle and fill in the circle if preferred.

Instructions:
To implement this example:
  1. Run the VI
  2. Draw a circle on the drawing pad.  Note that when you start drawing, the first click of the mouse is the center of the circle and where you drag the mouse is to the outer radius of the circle.
  3. You can also select the "fill circle?" box to create a filled circle.  You can also change the color of the circle.


To execute this example:

  1. Install the required software.
  2. Open the VI and refer the Implement Steps


Requirements
Software
LabVIEW 2012 or compatible

Hardware
-

fp.PNGbd.png

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

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