LabWindows/CVI User Group Documents

cancel
Showing results for 
Search instead for 
Did you mean: 

LabWindows/CVI Tip: Integrate Free Code Formatter into CVI Tools Menu

Customize Tools Menu

Use the Customize command to add your own menu items to the Tools menu. Each entry consists of a menu item name and an associated command line to execute. Each command line consists of a program name and optional arguments. When you execute an item from the Tools menu, LabWindows/CVI starts the program and passes the program the specified command line arguments. LabWindows/CVI saves your Tools menu entries from one session to another, not in the project.

Tools Customize.png

Example: Incorporate a Code Formatter in LabWindows/CVI Tools Menu

Artistic Style is a free source code indenter, formatter, and beautifier for the C, C++, C# and Java programming languages. To find information about this software or to download it, go to http://astyle.sourceforge.net/.

Instructions:

  1. Download and install AStyle or your favorite helper application
  2. In LabWindows/CVI select Tools » Customize
  3. Click the "Add" button to add a new entry in the Tools menu

Add custom item.PNG

Example command line arguments for AStyle: %FILE% --style=1tbs --indent-switches --pad-oper --add-brackets --align-pointer=name

Did you find this tip useful? Rate this document or add a comment below.

If you give this a try, share your experience! Add a comment below.

National Instruments
Contributors