Automatically create a Legend view in Revit® using the colors (and data) from the filters applied on a view.
- How to install the Camilion plugins
- New upgrades on LeGen v1.7
- Revit: Creating legends automatically with LeGen
- Using Revit Filters to create legend plans
Last Revision: February 2021
Supported versions: Revit 2018 to Revit 2021
What is LeGen
LeGen is a Legend Generator that automatically creates a legend view using the filter overrides you have applied on a view.
For a detailed tutorial in using filters to control graphic overrides, check out our other blog post. For the command to work, the only requisite is that your view has at least one filter set up, since this is where LeGen gets the data to populate the legend.
Let’s explore each option in detail.
Get Colors & Patterns From
(a) we find 4 radio-buttons that correspond to 4 possible options of where to get your revit data from. You can choose to get it from:
- Projection Lines
- Surface Patterns
- Cut Lines
- Cut Patterns
Choosing one of the Lines options will result in a legend where each entry is represented by a Detail Line (
Choosing one of the Patterns will result in a legend where each entry is represented by a Fill Region (
These options have been arranged to resemble Revit’s Visibility/Graphic Overrides dialog box (see image below).
Use patterns from filters
If the checkbox is enabled, the detail lines or filled regions created will have their pattern overridden to match the pattern chosen in the filter.
If the checkbox is disabled, the detail lines or filled regions will have a solid pattern applied.
Get Text From
This section allows you to choose where to get the text that will populate your legend:
Filter name: The filter’s name will be used.
Type Parameter: Enables a drop-down that allows you to choose from what parameter to draw the data to populate the legend.
Both options can be used simultaneously.
Line / Rectangle Dimensions
A textbox allows you to input the length of the lines or rectangles used in the legend. The measurement is in millimeters.
Changing the size of the legend
To change the size of the legend, simply change the texts height to whatever value suits your needs and re-run the LeGen plugin. You will see that the spacing between each of the entries will adjust automatically according to the text’s height.
As you can see in section
(e) of the first image, the generated legend’s view name will have the following format: Fixed prefix + Generating view name.
It is recommended that you don´t change this name or the generating view name, in order to maintain a live relationship between the legend and the view so that you can automatically update the legend if required.
All the elements in the legend are pinned. It is recommended that you don’t do any manual modification in this view, since updating the legend automatically will cause the loss of these changes. In any case, a Warning Dialog will display before updating the legend if LeGen finds that any element has been unpinned.
LeGen will create two family types needed for the legends creation:
- A Text Note type called CML.
- A Filled Region type called CML.