Model Transfer: from Revit into React Structures

With the Dynamo integration available in both React Structures TP3 and Revit, engineers are able to transfer a Revit model into React Structures in a very flexible way.

In this post you will discover how to build a Dynamo graph to create a one-way model exchange workflow from Revit to React Structures. For that we will see how to:

    1. -Read analytical model from Revit stick elements
    2. -Convert the Revit analytical model representation to React Structures members
    3. -Read family types from Revit elements to get cross section names
    4. -Load cross sections defined in Revit that are not matching steel cross sections loaded into current -React Structures project
    5. -Assign proper cross sections to React Structures members.

To achieve this workflow, you will need to have installed on your machine:

  • React Structures TP3 – available here
  • Revit 2016 – available here
  • Dynamo for Revit version 0.9 (installed with React TP3)
  • Files for this excercise – available in this .zip archive

1. Get Started

To get started, let’s follow initial steps:

  • Start Revit 2016 and open one of the .rvt files from the zip attached (imperial and metric versions are both available).
  • Open React Structures and create a new empty project.
  • The steel building model is a steel frame composed of 9 columns, 10 beams and 4 beams system.
  • r2r01
  • Start Dynamo 0.9 from Revit Add-ins Ribbon tab and create a new graph
  • Set the graph evaluation run to Manual.

 

2. Read Revit analytical model with Dynamo

Now we are setup and we need to read the analytical model from Revit and move its representation into Dynamo.

  • To expose analytical model of stick elements into Dynamo, we need to add the node All Elements of Type to our graph (1). This node take as input Revit Element type node output (2).

The node Elements type exposes all element types available in Revit. We should add this node to our graph, connect it to the input of the All Elements of Type node and choose AnalyticalModelStick from the combo box (2).

To see result we could now add a Watch node (3) and hit the run button.

r2r02
  • At this stage the connection Revit and dynamo is set. To view analytical elements in Dynamo canvas and access their geometry, we need to add the node curves and connect it to the output of the All Elements of Type node (1). After the evaluation of the graph, the output will be a list of curves for each of our Revit analytical elements and the geometry will be drawn in the 3D view (2).
r2r03
  • Now we need to get the cross section assigned to Revit analytical model element. In Revit, the cross section name is defined by the family type parameter. To access this parameter we could add the node GetParameterValueByName (1). This node takes two inputs, an element and the name of the parameter. Elements will come from the output of the node All Element of Type. To specify the name of the parameter, we will add a CodeBlock node (2) (by double click inside Dynamo canvas) and set “Family Type”; as input value. The result will be the family type of each physical element hosting a stick analytical model.
r2r04

3. Prepare the analytical model

We have now access to data describing the Revit model in Dynamo however few additional steps are necessary to before sending them to React Structures

  • If you are looking at the output of the curves node you will see that the analytical model is split in three pieces. We need to find a way to convert these 3 curves into a single curve that will represent a member in React Structures. For this we will use a CodeBlock to merge curves. The code we need add into our CodeBlock node is the following:

 

//get the list of first curves describing the analytical model and store it
firstCurves = List.FirstItem(curves<2>);
// get the list of second and third curves describing the analytical model and store it
secondAndThirdCurves = List.RestOfItems(curves<2>);

// Join elements from the first list and the second list
firstCurves.Join(secondAndThirdCurves);
The output of this node is a list of Polycurves describing our analytical model and this list will be used to create bars in React Structures.

r2r05

To assign a cross section to React Structures element, we need its name. To achieve this we could connect the Element.GetParameterValueByName node output to a FamilyType.Name node. The output of this node will be the name of the cross section assigned to each of the elements.

r2r06
  • Dynamo is passing data to React Structures into SI units. This mean that unit for length in Revit should be set meter. If this is not the case, a scale factor could be applied to the geometry using the node Scale. Our list of curves should be pass as input of the node as well the value 0.3048 witch is the ratio foot-meter.
r2r07

4. Create the model in React Structures

Now we need to add to our graph some nodes that will create model in the React Structures.

  • React Structures installation add a series of dynamo nodes into Dynamo for Revit. These nodes could be found under the category Analyze/Structural Analysis for Dynamo. To create a bar in React Structures, the node ByCurves could be used. This node will create a straight element in React Structures using the curve start point and end point passed as input. The input of this node is here our list of polycurves objects returned by our previously created CodeBlock node.

 

r2r08
  • Running the script at this stage will generate bars in React Structures, however cross section won’t be applied.
r2r09
  • To assign a cross section to a React Structures element, the section should be available in current project. To be sure that required section are available, we will create a new CodeBlock with following code:

 

// Create a list of unique section name
uniqueNames= List.UniqueItems(names);
// Load section into react Structures
Bars.LoadSections(uniqueNames);
// return the list of section name that
//should be assigned to each members
names;

Now, when evaluating the graph, all missing sections will be loaded into React Structures if they are present into the active React Structures section database.

r2r10
  • To complete this graph, we need to assign cross sections to React Structures members. This could be achieved by using the node SetSectionByname. Inputs of this node are the list of analytical bars created by the node Bars.Bycurves and our list of strings output of our second CodeBlock.
r2r11
  • Running the script will now assigned proper sections to React Structures elements.
r2r12

You can see a quick video of building and running this script below:

5. Conclusion and limitations

With this graph, our Revit model is passed to React Structures using Dynamo as proxy. If we turn the Dynamo evaluation model into automatic, Revit model changes like the modification of the location, changing the family type and adding and removing elements will be propagated automatically into React Structures.

This graph is an example of the workflow we could enable using React Structures, Revit and Dynamo. This graph could be extended to manage some additional analytical model elements like curved beams and surface elements and to transfer some Revit analytical model parameters like supports, release and loading condition.

As reference, we are joining to this article a zip file containing an imperial and metric version of the Revit model used and associated Dynamo graphs.

Questions? Comments? Jump to the forum to discuss with the team

One Comment

Comments are closed.