You may want to know how to set up access to the public macro repository.  Here is a bit of a step by step:

  1. Install SourceTree
  2. Follow prompts to install additional packages
  3. Login to the BitBucket Page in a web browser (register if you haven’t already)
  4. Click on the arrow and Check out in SourceTree
  5. Clone New — Make sure the path is set exactly to this (make folders if you have to):
    C:ProgramDataAutodeskRevitMacros2014RevitAppHookupPublic_2014
  6. After fetching, restart Revit.

Its important that it looks like this in SourceTree:

Upon restart, you should see the Public_2014 tree in your Macro Manager.

To ensure you have the latest version:

  1. Do a Fetch and Pull in SourceTree
  2. Edit one of the macros
  3. Do a Rebuild by hitting F8 – any new code or extra macros should now show up

(thanks to Troy Gates for above tip)

Note:  Make a sample macro and it will populate files and folders in:
C:ProgramDataAutodeskRevitMacros2014

You can also carefully follow the images at :
A public Git repository for sharing Revit Macros at BitBucket | Boost Your BIM – making Revit even better

Boost Your BIM has been posting some awesome stuff.  One older post shows you how to quickly purge your Revit model of Imports:
a FilteredElementCollector, a bit of LINQ, a transaction, and Document.Delete to get the imports (but not the links) out of the model.

Check out the code at:
Delete Imported DWGs and Other CAD files � Boost Your BIM – making Revit even better

If you want to learn how to set-up and use macros in Revit, check out:
Setting up your Revit project for inputting macro codes – Benjamin Malone

His detailed post covers:

  • Revit Macro Manager
  • Module creation and choosing a language
  • SharpDevelop
  • Building and running the macro

This little utility is VERY basic.  It can basically can record mouse movement and clicks, and keyboard input.  You can record a task, save it to a file, open an existing recording, and play.  There are some basic options to do with ‘Play Speed’ and number of repeats.

Download link

It can even save your recorded macro as an EXE file – however:
There are pros and cons in saving the macro in .rec file or compiling it to an .exe file. Once compiled into an EXE file, you can run the macro without TinyTask. However, the play speed and repeat count/continuous playback option are hardcoded during compilation and can no longer be changed. If you save it into a .rec file, it requires TinyTask to run but you can set the play speed and repeat count/continuous playback.

For more detailed information, check out this post:
TinyTask: Small and Lightweight Automation Software | Raymond.CC Blog

Image via Raymond.CC Blog

There is a nice, basic guide on using the Revit 2010 Macro Manager in the latest AUGIWorld Magazine.
(LINK UPDATED 14/03/2011)

Check it out if you are interested in the API.

Picture from AUGIWorld Magazine.

Once you get into Revit programming, check out The Building Coder.

There is also an article in the magazine on Autodesk Impression, if you are interested.