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

cancel
Showing results for 
Search instead for 
Did you mean: 

how to DELETE source code macro?

Solved!
Go to solution

Somehow, I've managed to record a source code macro and now I can't delete it!  Worse, I added a key macro to it which I (naturally) keep hitting by accident.

 

Worser, I can't remove this macro!  The option is grayed out.  I also can't remove the keyboard shortcut assigned to this.  What am I missing here?

 

2014-07-21 08_05_09-Manage Macros.png

0 Kudos
Message 1 of 6
(4,725 Views)

Right-click on the macro name and select Remove. Change Key to change the assigned shorcut key.

 

Screenshot 2014-07-22 15.22.00.jpg



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 2 of 6
(4,723 Views)

I tried that first thing.  For some reason those options are all grayed out on "temporary macros" on my 2010 CVI install.

 

My workaround was to record a new temp macro with minimal, non-destructive instructions.  Notice my new listing of macros (move mouse, etc.).

 

2014-07-22 07_27_24-c__..._SVN Checkouts_ABI - test executive_ABI test sequencer.cws - [setup.c].png

0 Kudos
Message 3 of 6
(4,721 Views)
Solution
Accepted by topic author ElectroLund

Right, I didn't focused that it was the temporary macro. It appears as if the temporary macro cannot be deleted, so your solution to fill it with harmless instructions appears the right way to go.

Since every time you record a temporary macro you overwrite previous content you can simplify the macro by recording one instruction only.



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 4 of 6
(4,714 Views)

If you don't want to keep those fake steps indefinitely. you can get rid of the temporary macro altogether by modifying the registry.

 

After you exit CVI, run 'regedit', navigate to the path I've highlighted in red below (except that you should replace 13.0 with 10.0, if you're using CVI 2010) and then delete every value except for Macro000Name, as shown in the picture:

 

macros.png

0 Kudos
Message 5 of 6
(4,666 Views)

Thanks, Luis.  But I think this qualifies for a feature suggestion?  There needs to be a way to delete these from inside CVI.  As in my case, I had inadvertantly recorded some macro commands that were destructive if played on accident!

0 Kudos
Message 6 of 6
(4,661 Views)