Example Code

2-D Picture Line Drawing Tool with File IO

Code and Documents

Attachment

Download All

This VI is a simple drawing pad where you can draw lines. I made this so I could easily draw a maze for a game I am making while being able to easily export the coordinates of the lines.

Directions for use:

Click and Drag within the Image Display to draw a line from where you pressed the mouse button to where you released.

Use the 'Delete File When Stopped' which will clear the contents of the text file when the VI is stopped rather than saving it.

The file is automatically created in the Application Directory under the name 'Lines.txt'

You can change the color and settings of the lines you load and also of each line you draw.

The loaded lines will be of the same Color and settings.

Drawing.PNG

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

Contributors