When building Revit addins, you may want to implement some specific selection filter. Here is some more good stuff via Alexander Buschmann and The Building Coder:
The zip file SelFilters.zip contains
- the SelFilter class,
- the interface files, an
- example external command
using some of the SelFilter functionality, an
- add-in manifest file for
the example command and a
- small Revit project to test it in.
The Building Coder: SelFilter, a Powerful Generic Selection Filter Utility
To try it out:
- In Visual Studio (I use Express 2013 for Windows Desktop), make a new Class Library Project
- File – Save project as – RevitSelectionFilters.csproj
- Add RevitAPI.dll and RevitAPIUI.dll references (2014)
- Add – Existing Items. Choose all the .cs files from the zip
- Set project properties Assembly Name and Default namespace to RevitSelectionFilters
- Save All
- Build Solution
SelectionTest.addin and RevitSelectionFilters.dll
And screencast showing the examples:
Good intro to Revit customization:
From the help:
Help: External Commands
Setting up an External Command in Revit 2015:
EXTERNAL COMMAND IN 10 STEPS FOR REVIT 2015 API
Most of you already know how highly I recommend Harry Mattison. He is completely at peace with the Revit API, and he knows instinctively how to solve Revit coding challenges that are out of reach for most of us.
For less than $150, you can learn the Revit API from the master, at https://www.udemy.com/revitapi/
Harry was an employee of Revit Technology Corporation and Autodesk from 1998 to 2012 and spent four of those years developing and testing new Revit APIs in areas such as the Family Editor, Massing, Analysis Visualization, Dynamic Model Update, and Views & Schedules.
I have personally started reviewing the classes, and the level of expertise targeted by this course is very appropriate — intermediate to advanced Revit users, with a comprehension of basic programming techniques. Not too basic, and not too complicated 🙂
If you are interested in programming in Revit, check out Spiderinnet’s blog. Very extensive!
This blog focuses on Revit Addin Wizards, Coders, and API Widgets.
Revit Addin Wizards/Coders and Revit API Widgets – Spiderinnet’s blog
Are you an Autodesk Revit power user with an interest in becoming even more productive? Would you like to automate or extend the capabilities of Revit, but are new to computer programming? If so, then this guide is designed for you.
“My First Plug-in” is a self-paced tutorial guide for a smooth introduction into the programming world. This is a “one-stop shop” learning path for users who know Autodesk products but are absolutely new to programming and are thinking about taking the plunge. In this guide, you will be working with the Autodesk Revit .NET API and the C# programming language. The supported product version is Autodesk Revit Architecture 2011 and succeeding versions.
Product: Autodesk Revit 2011 or higher
Programming Language: C#
Application Programming Interface (API): Revit .NET API
Autodesk – My First Plug-in Training – My First Revit Plug-in Overview
If you are interested in Revit Programming and the Revit API, you may be interested in the resource located below:
It is essentially an overview presentation of the API. It also includes a demonstration on the RvtMgdDbg tool (now known as RevitLookup).