VSTA is the acronym for Visual Studio Tools for Applications and is the replacement technology from Microsoft for VBA (Visual Basic for Applications). VSTA is a .NET development environment built into Revit (and other Autodesk applications) and can be used to create both VB.NET and C# based macros. While I called this a "light" programming environment that is not to say this is for beginners as you will need to have some programming skills to take advantage of this feature, maybe Matt can provide an example file that can be useful.
To get started you will need to add this to your installation by using the following steps:
1. Depending on how you installed Revit to begin with (direct download or from the disk) go back to the Installation Screen and choose Install Tools and Utilities (shown below):
2. Make sure to check the Revit VSTA for Architecture 2009 (or Structure/MEP depending on your particular program).
3. Installation will take a few minutes and give you a screen below as it installs the right components:
4. Once it is installed, the first time you start Revit up after that you will get the following notification for a short period of time indicating it is configuring your environment for first time use:
5. Now we are ready to start using, with a project open go to Tools>>Macros
6. Now you will need to make a choice; either run/edit a macro (Macros) or create a new one from scratch (Launch VSTA IDE). When you use the Macros option this is basically a manager for your macros providing two sub-options: Application Level or Document Level.
- Application level macros can be run on all opened Revit projects within the active Revit session (instance).
- Document level macros are stored within your .rvt file and can be loaded within the current active project.
It will be interesting to see how this gets used, if you have a great example let us know.
Happy Revit VSTA'ing...