Introduction to Revit Macros (article by Troy Gates)

The next generation of successful designers will have one important thing in common – the ability to quickly build the tool they need to accomplish a given task. Revit macro coding is one way to do this (Dynamo is another, even powerful Excel spreadsheets can qualify as BIM tools). But if you have had limited involvement with Revit macros in the past, you might be wondering “So… What is a macro anyway?”

One good place to start would in this great little article by Troy Gates on AUGI. Here are three tips from the article to get you interested:

  • I highly suggest creating the macros in the application tab so you can reuse the macros in any Revit model. If you store the macro inside the model, then it is only available to that Revit model.
  • The Revit API also allows the use of Microsoft LINQ (Language Integrated Query) functions. LINQ allows you to use a database-like query system to filter the elements contained in a collection. It is much more powerful and easier to use, in my opinion, when working with collections of Revit elements.
  • your code needs to define objects that the Revit API will use to interface with these. These objects are called UIDocument and Document…

Read the whole article:
Introduction to Revit Macros | AUGI

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments