From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabWindows/CVI User Group Documents

cancel
Showing results for 
Search instead for 
Did you mean: 

LabWindows/CVI Tip: Using Macro Tools

Macro Overview

Macros are very useful when you want to automate and repeat a series of actions, such as keystrokes and menu selections. There are two types of macros that you can record: temporary and permanent. Temporary macros are overwritten anytime you record a new temporary macro, but permanant macros can be saved and can be loaded into new instances of LabWindows/CVI. Saving and loading permanant macros can be very helpful for sharing macros among multiple developers or storing macros in a source code control system.

Recording Macros

To get started recording macros, select Tools»Source Code Macros»Record Macro or select Tools»Source Code Macros»Record Temporary Macro, depending on the type of macro you would like to record.

record.png

Pausing Macro Recording
You can pause the reocring phase of the macro by selecting Tools»Source Code Macros»Pause.

recording_pause.png

Resuming Macro Recording

To continue reocring the macro by select Tools»Source Code Macros»Continue.

continue_recording.png

Stopping Macro Recording
When you have completed recording the macro, select Tools»Source Code Macros»Stop Macro or select Tools»Source Code Macros»Stop Temporary Macro, depending on the type of macro you are recording.

recording_stop.png

Saving Macro

  • Permanent: When you have finished recording a permanent macro, the Manage Macro dialog box will appear. You can use this dialog to rename a macro or assign a shortcut key to the macro.
  • Temporary: To save a temporary macro, right-click the Temporary Macro in the Macros list of the Manage Macros dialog box and select Rename. Renaming the temporary macro creates a copy of that macro with the name you specify. You must rename a temporary macro to save it.

Loading Macro
You can load a previously recorded macro from the Manage Micro dialog box which can be launched by selecting Tools»Source Code Macros»Manage. To load saved macros, click the Load button in the Manage Micro dialog box.

load_save.png

Executing Macros

  • Permanent: You can run permanant macros from the Tools»Source Code Macros»Your Macro.
  • Temporary: When you record a temporary macro, LabWindows/CVI stores it as the Temporary Macro.You can execute the temporary macro by selecting Play Temporary Macro or by pressing <Ctrl-Shift-V>.
Adri Kruger
National Instruments
LabVIEW Product Marketing
Comments
Kobi_K
Active Participant
Active Participant
on

Nice i didn't know about it..... , Thanks

-----------------------------------------
Kobi Kalif
Software Engineer

Contributors