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).
  • Vector Visualizer : visualizes a 3-vector system in Dynamo (Red-Green-Blue = XYZ)

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.

vg1

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.vg2

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”.vg3

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 node is simplified. This means that the number of elements in the List.Cycle node equals the number of elements x number of view types.vg4

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.vg5

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.

vg6

The results is similar to the one from the previous post.101515_2156_AutomaticEl2.png

Known Issues

There are also a few limitations to this workflow that you should be aware of:

  1. When the views for a selected element already exist, then Revit will return an error message and the Dynamo graph won’t be executed at all.
  2. When you run the Dynamo graph, then add annotations to a generated view, and then rerun the Dynamo graph in the same session, then all these annotations will be disappear.

Datasets

A dataset containing the Revit file without the generated views and a Dynamo graph prepared for Structural Columns, Structural Framing and Generic models can be downloaded here.

[Edit 22/06/2017]

Please also read the comments at the bottom of this tread as they contain more information and updates on this topic.

Advertisements

13 thoughts on “Element View Generation in Revit with Dynamo – REVISED

  1. Pingback: Weekly Roundup – 2017.06 | The BIMsider

  2. This blog of yours is awesome, I’m new in dynamo, but this topics catch my attention, wow that’s all I can say, WOW, Thanks for sharing 🙂

  3. Hi Dieter, I haven’t tried this yet, but do you think we could use this to automatically generate “room elevations” (or wall finishes drawings)?
    Again, fantastic work!

    • Hi Francisco,

      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.

      Cheers,

      Dieter

      • 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.

  4. Hey Dieter,

    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?

    Thanks in advance for your time, hope you can help!
    Rob

  5. 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.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s