Revit Client Support
How to make Swarm Apps work in the Revit Client
Last updated
How to make Swarm Apps work in the Revit Client
Last updated
The Swarm Client for Revit allows BIM data to be read from and written into open Revit project documents. The table directly below describes which Revit element types are supported, which Swarm Input and Output types those elements map to. The sections below the fold detail how to use Attributes to read, write and update native Revit data.
Revit Family Category
Swarm IO Type
Read / Write / Update supported?
Structural Framing
Curve, Mesh
Read, Write, Update
Structural Columns
Curve, Mesh
Read, Write, Update
Floor
Curve, Mesh
Read, Write, Update
Wall
Curve, Mesh
Read, Write, Update
Model Line
Curve
Read, Write, Update
Detail Line
Curve
Read, Write, Update
Generic Model
Mesh
Read, Write, Update
Reference plane
Surface
Read, Update
Grid
Curve
Read, Update
Level
Point
Read, Update
In order to create native Revit elements when baking geometry from Swarm App (for Structural Framing, Structural Columns, Floors, and Walls only), the correct attributes need to be set up. Include the Swarm Revit Element component in your App to set the Category, Family and Type for your elements:
Input
Description
Attributes (optional)
Category
Revit Category (e.g. - Floors, Structural Framing, etc.)
Family
Revit Family (e.g. - Floor, W-Wide Flange, etc.)
Type
Revit Type (e.g. - 8 Concrete Slab, W8X10, etc.)
The Swarm Revit Element component allows you to assign multiple revit attributes to your geometry. Use the Construct Attributes component to add attributes to your geometry as a list of keys and values, that will become an object properties in revit when you bake your elements:
If the key you specify does not exist, it will be ignored
Make sure you have the correct families loaded in Revit. In case the family does not exist, a following warning will pop up and the elements will not be baked:
The table below illustrates how to create native Revit elements for every currently supported type:
Element
Description
Columns
Framing
Floors
Generate an outline of the slab and assign attributes to it, use Define Children component to create openings:
Walls
Generate a linear base curve(s), and assign attributes to it, use Construct Attributes component to set the wall height:
Model Line
Doesn't require attributes attached, output a curve and bake it to the 3d view in Revit to get the Model Lines
Detail Line
Doesn't require attributes attached, output a curve and bake it to the 2d view in Revit to get the Detail Lines
Generic Model
Doesn't require attributes attached, output a mesh and bake it to the 3d view in Revit to get the Generic Model
The Swarm App shown below draws a simple building with all currently supported geometry types:
https://swarm.thorntontomasetti.com/app/5ea04931a4572a0004745733/info
When BIM elements are referenced as inputs in an App, they bring a number of Parameters along with them in the form of Attributes. Use Extract Swarm Attributes + Deconstruct Attributes components to extract all attached data from referenced Revit elements. The following properties/Attributes are supported:
Default Built In Swarm Attribute
Revit Property
Id
Revit ID
Name
Revit Type
Layer
---
Keys
Values
Color
(0)
Use Extract Swarm Attributes component if you want to assign the same attributes to the updated geometry:
Use Deconstruct and Construct Swarm Attributes component if you want to modify existing Revit parameters and assign those to the updated geometry:
The app below demonstrates how to update a parameter - in this case the Unconnected Height of a wall - in a swarm app:
Reference a Revit wall into the swarm app
Use Extract Swarm Attributes + Deconstruct Attributes components to extract all attached data
Find the value you want to update
Use Construct Attributes + Inject Attributes components to create an output geometry
Run the swarm App and bake the geometry into Revit, the wall height will be updated
Change the "Attribute name to update" and "New Value" inputs to update other Revit parameters for referenced geometry. The list of all exiting attributes can be found in "Existing Attributes" output of the app:
https://swarm.thorntontomasetti.com/app/5eb46f1e3f2d1e0004fac9b3/info
Use to assign other than the three listed below
Generate a linear centerline(s), and assign attributes to it:
Generate a linear centerline(s), and assign attributes to it:
List of attribute names + the three attribute names that creates
List of Revit attributes + the three attributes that creates