Click here to Skip to main content
15,885,309 members
Articles / Programming Languages / C#

Visual Studio Addin to run Macros

Rate me:
Please Sign up or sign in to vote.
4.00/5 (1 vote)
18 Oct 2006CPOL1 min read 36K   371   7   3
A Visual Studio add-in to simplify running your macros

Sample Image - maximum width is 600 pixels

Introduction

Macros Manager is a Visual Studio .NET 2003 Addin that launch specified macros from a Windows Form. Having been creating and using many macros in Visual Studio .NET 2003, I was looking for a way to call them easily.

I first added menus with a Shortcut on my macros into Visual Studio, but many times the design layout disappeared. Then I had no choice to find another way to call my macros quickly. That's why I have made Macros Manager.

Actually, it just execute macros, but you can improve it to manage macros, depending on your needs. 

Using the code

Macros Manager is an addin. You should be familiar to addins before install or improve Macros Manager. If you want to use it, simply install it with the demo project.

After installing the addin, you will have a new menu in the Visual Studio .NET 2003 tool's menu:

Sample Image - maximum width is 600 pixels

 

Macros Manager is simple to use. Behind it there is a mapping file, written in XML, that let you configure which macro you want to launch by clicking on a node in the treeview in the form. Obviously, the macro must exist.

You can also create group nodes if you want to create a structure for your macros.  There is no level limitation.

Example of the XML file:

XML
<?xml version="1.0" encoding="iso-8859-1" ?>
<Root>
   <Node1 ImageIndex = "0" Name="Macros group 1">
      <Macro ImageIndex = "1" Name="Show Hello 1" 
             MacroStrongName="Macros.MyMacros.Functions.Hello1" />
      <Macro ImageIndex = "1" Name="Show hello 2" 
             MacroStrongName="Macros.MyMacros.Functions.Hello1" />
   </Node1>
   <Node1 ImageIndex = "0" Name="Macro group 2">
      <Macro ImageIndex = "1" Name="Show hello 3" 
             MacroStrongName="Macros.MyMacros.Functions.Hello1" />
   </Node1>
</Root>

Points of Interest

Another way to manage macros in Visual Studio, without changing the IDE layout.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
France France
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions

 
GeneralMacro Explorer Pin
Kevin McFarlane18-Oct-06 10:35
Kevin McFarlane18-Oct-06 10:35 
GeneralRe: Macro Explorer Pin
Sarvesvara (BVKS) Dasa18-Oct-06 17:08
Sarvesvara (BVKS) Dasa18-Oct-06 17:08 
Good Article!!

Kevin, as you guessed, its for those who want to keep things their way..

"He that is good with a hammer tends to think everything is a nail."
- Abraham Maslow

GeneralRe: Macro Explorer Pin
joujoukinder19-Oct-06 8:55
joujoukinder19-Oct-06 8:55 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.