C# .NET Revit add-in to calculate and display signal attenuation using AVF
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
RvtFader flat migration to Revit 2018 Oct 15, 2017
doc removed junk Mar 21, 2017
img typo Apr 5, 2017
test flat migration to Revit 2018 Oct 15, 2017
.gitignore flat migration to Revit 2018 Oct 15, 2017
LICENSE Initial commit Mar 21, 2017
README.md cleanup Apr 13, 2017
RvtFader.sln added wizard skeleton app Mar 21, 2017



C# .NET Revit API add-in implementing an external application to calculate and display signal attenuation using the analysis visualisation framework AVF and ReferenceIntersector ray tracing.

You might also be interested in comparing this add-in with the ForgeFader app implementing similar functionality using the Autodesk Forge platform.

RvtFader icon

Task and Functionality

This application works in a Revit model with a floor plan containing walls.

It calculates the signal attenuation caused by distance and obstacles.

In the first iteration, the only obstacles taken into account are walls.

Two signal attenuation values in decibels are defined in the application settings:

  • Attenuation per metre in air
  • Attenuation by a wall

Given a source point, calculate the attenuation in a widening circle around it and display that as a heat map.

We use the Revit API ReferenceIntersector ray tracing functionality to detect walls and the analysis visualisation framework AVF to display the heat map.


To achieve this task, RvtFader implements the following:

  • Implement an external application with custom ribbon tab, panel, split button, main and settings commands

RvtFader ribbon tab

  • Manage settings to be edited and stored (signal loss in dB).
  • Enable user to pick a source point on a floor.
  • Determine the floor boundaries.
  • Shoot rays from the picked point to an array of other target points covering the floor.
  • Determine the obstacles encountered by the ray, specifically wall elements.
  • Display a 'heat map', i.e. colour gradient, representing the signal loss caused by the distance and number of walls between the source and the target points.

Summary of the steps towards achieving this:

  • Skeleton add-in using the Visual Studio Revit Add-In Wizards.
  • External command for the settings user interface displaying a Windows form and storing data in JSON as developed for the HoloLens escape path waypoint JSON exporter:
    • Display modal Windows form.
    • Implement form validation using ErrorProvider class, Validating and Validated events.
    • Store add-in option settings in JSON using the JavaScriptSerializer class.
  • AVF heat map, initially simply based on distance from the selected source point:
    RvtFader displaying distance using AVF
  • Graphical debugging displaying model lines representing the ReferenceIntersector rays traced using ReferenceIntersector, conditionally compiled based on the pragma definition DEBUG_GRAPHICAL:
    Graphical debugging displaying model lines
  • AttenuationCalculator taking walls and door openings into account:
    Attenuation calculation results

For more details on the implementation steps, please refer to the list of releases and commits.

Two sample models are provided in the test subdirectory; the same are also provided and used with the ForgeFader app app:

Fader test model

Further Reading


Jeremy Tammik, The Building Coder, ADN Open, Autodesk Inc.


This sample is licensed under the terms of the MIT License. Please see the LICENSE file for full details.