Thursday, December 13, 2012

Some simple yet very cool API and Macro tips

You may have already heard about Boost Your BIM - a new and quite prolific programming (API and macro) blog for Revit by Harry Mattison.  If his recent posts are anything to go by, this blog should be on your 'must follow' list.  Also, I could be wrong, but I think his profile image might be a reference to my post here...

On Twitter at twitter.com/BoostYourBIM

Here is some recent posts that I found to be pretty interesting:
Macros vs. Add-Ins – What’s the difference?
The code for your macro is stored in an RVT file if it is a document macro. If you create an application macro the code is stored independently on your computer ... The code for your Add-In gets compiled into a DLL file.  

Revit API Wiki and RevitAPI.chm
Revit API Developer’s Guide Wiki at http://wikihelp.autodesk.com/index.php?title=Revit/enu/2013/Help/00006-API_Developer%27s_Guide

Scrubbing Out Dimension Styles
Harry provides a deleting / purging macro that handles both dimensions in sketches and dimensions in unplaced groups.

Save a Set of Elements with SelectionFilterElement
Although full Revit 2013 (Onebox) has built-in Saved Selections, you can see how little code is required to actually make basic selection filters on this post.


I previously posted about a free add-in for single selections, and there is also Case Apps Reusable and Sharable Selection Sets...

Finally,
Making Lines Not Print (with Events)
I can't say I've ever wanted this ... but it basically switches a certain line style to white before printing, then back afterwards... 

Some info about Harry (from BIMopedia):
Harry joined Revit Technology Corp in 1998 and spent his last few years at Autodesk as a software developer on the Revit API team. Now Harry has set out on this own and would like to help more people appreciate and benefit from the Revit API.

No comments:

Post a Comment