Design from another point of view…

Main menu

Post navigation

Element View Generation in Revit with Dynamo – REVISED

In October 2015, I wrote this post on this blog about how to automate the generation of detail (section) views of some specific Revit elements by means of a Dynamo graph. With the functionalities available at that time in Dynamo, that workflow was a bit devious and hard to modify.

To simplify the whole workflow I created some new custom nodes that make it possible to detect the local axes of a Revit element, which then can be used as orientation vectors for the several section views.

Before you start playing yourself with the script (which is provided at the bottom of the post as usual), you’ll need to first install the package BIM4Struc.Productivity from the package manager in Dynamo. This package contains a few specific nodes such as:

Create Element View : node that helps creating views based on the bounding box of a selected element and some indicated orientation vectors.

Element.LocalCoordinateSystem : returns the insertion point and X, Y, Z orientation vectors of a selected element (also works on Structural Columns).

In the example graph you’ll learn how to apply the methodology in several ways for Structural Columns, Structural Framing and Generic Models. The system is almost for any case the same. Below I’ll explain you how to use it on Structural Columns.

1. Boundary Offsets

The two sliders in this group define the size of the section view crop region and its view depth.

2. Object Selection

You can either choose to select all elements of the category Structural Columns or you choose them manually by picking them in the Revit graphical user interface with the Dynamo node Select Model Elements.

3. Get local principal vectors

The goal of this group of nodes is to define the orientation vectors for the section views. These vectors will define the width (x-vector), height (y-vector) and depth (z-axis) of the section view.

As we want the view to be aligned with the orientation of the selected Revit element, these vectors are defined by the element’s “local coordinate system”. That’s where the custom node Element.LocalCoordinateSystem comes to the rescue.

The “Boolean” node allows you to switch the direction of the section view.

The …/ List.Join nodes group then the several combinations of x, y and z, in order to get a cross section, front view and side view of the element. These lists are later used as input ports for Create Element View node at the end.

4. Definition of the View Names

Another input the Create Element View node needs is a “View Name“. This section helps to automate the definition of these names, based on the element’s parameter value for “Mark”.

5. Element Subsets

As per element we need 3 different views, a simple cycle of elements is done, so the input for the Create Element View nodeis simplified. This means that the number of elements in the List.Cycle node equals the number of elements x number of view types.

6. Definition of View Center

One more input we need for the Create Element View is the center point of the view. The crop region of the section view is then centered around that point, taking into account the boundary offsets, defined earlier in the graph.

It doesn’t matter how you define this center point. In this case, two methods are shown. The top one uses a point that is vertically offsetted from the element’s insertion point. The bottom one simply takes the centroid of the solid of the Revit element.

7. View Creation

At this last part of the graph, all defined properties are connected with the custom node Create Element View from the BIM4Struc.Productivity package.

The X- and Y-vectors defined in step 3 define the width and height orientation of the crop region of the section view.

The CropRegionOffset and ViewDepth are defined in step 1 with the Boundary Offset sliders.

The CSPoint is a the center point (step 6) of every section view for the appropriate element. (Mapped with the List.Cycle node from step 5).

The Revit Elements are needed as the Create Element View node is detecting the size of the elements to defined the minimal size of the crop region of the view.

A name for ever generated view is needed. This can be defined through the ViewName input, and is defined in Step 4 of this graph.

This might work for any object you want to create views from. As long as you can extract the vectors needed for the view orientation. The collection of these vectors might be different for each category, depening on what you want to have. For instance, beams are linear, so you can use their location line. Rooms are volumetric, so you need to get the surfaces and their normal vectors for that.

Hi Dieter, nice work! I was thinking about making my own version, in witch you are not bound bij certain categories. But you comment above makes me think. Is there some location where i could find out what kind of vectors i need to extract for each categorie? i cant seem to find any.

I’ve downloaded your dataset and am using the Generic Models section of it to attempt to automate the sectioning process of doors and television. When I plug in a door or television, and press run, all it seems to do is place another identical instance of the selected object that is blue in color, but cannot be selected. Not sure what I’m doing wrong, or if different nodes need to be used in order to get it working for these objects?

REPLY TO ALL:
The latest version of the dataset in this blogpost (same downloadlink) contains an updated version of the script and custom node (included in the BIM4Struc.Productivity package) which allows to create views for Doors and Windows too.