# Workflow: Family Distribution Part 3

In today’s lesson we will see how to distribute the “Chair” Family over a squared equally spaced grid.

The lacing technique will be used in this lesson to quickly establish the square grid of eleven rows and eleven columns spaced equally by 1000 unit.

We will need to use the following Nodes:

• 4 x Number
• Range
• Family Types
• Point.ByCoordinates
• FamilyInstance.ByPoint

First we will generate a list of X and Y values by using the “Range” Node. These values will specify the number of rows, columns and the distances between them respectively.

By changing the lacing of the “Point.ByCoordinates” Node to Cross Product, we get every combination between each value in the X values list and Y values list, giving us an 11 x 11 grid of points. This is an equivalent data structure to the cross product, except our data is now a list of lists.

From the “Family Types” Node select the “Chair” Family. By connecting the “FamilyInstance.ByPoint” Node input to the “Family Types” Node output and the “Point.ByCordinates Node output, we can see that we have 121 chairs arranged in a grid of 11 rows by 11 columns.

# Workflow: Family Distribution Part 2

In the second part of the “Family Distribution” lesson we will use the Family “Chair” and distribute it on a closed path around a Table.

In the part 1 of this lesson we allowed Dynamo to calculate automatically the length of each segment by dividing the total length of the path by the number of segments. This time we will do the opposite, we will specify the segment length and let Dynamo calculate the number of segments needed.

For this part of the lesson we will draw a Model Curve on the shape of a circle to use it as a guide for the distribution path, divide it into equally spaced segments then insert the “Chair” Family at the end point of each segment. We will let the “Table” Family be at the center of the circle.

So as we planned the workflow logic in our mind we can find the nodes that are needed to implement it. Now we will open Dynamo and create a new Workspace.

From the Categories Search find the following nodes:

• Select model element
• Element.Curves
• Curve.DivideByDistance
• Number Slider
• Curve.EndPoint
• Family Types
• FamilyInstance.ByPoint

In order to insert a model element from Revit environment into Dynamo environment we shall use the ”Select model element” Node, so click on select and from Revit project pick the model line.

After the Model Curve is brought into Dynamo we need to extract the Curve geometry from it so we connect the ”Select model element” Node output to the “Element.Curves” Node input. The curve geometry is ready now to be divided so we will connect the output of the “Element.Curves” Node to the input of the “Curve.Divide Equally” Node input.

To determine the length of each segment we will connect the “Number Slider” Node to the “divisions” input in the “Curve. DivideByDistance” Node. By changing the slider value the number of divisions will increase or decrease respectively.

As the curve has been segmented we need to locate the end points as they will be our insertion positions for the “Chair” Family instances. So connect the output of the “Curve. DivideByDistance” Node to the “Curve.EndPoint” Node input. Now from the “Family Types” Node select the “Chair” Family Type and connect it to the “FamilyInstance.ByPoint” Node.

The last step before hitting the “Run” button is to connect the insertion points coming from the “Curve.EndPoint” Node into the “FamilyInstance.ByPoint” Node. We can hit “Run” button and see the result in the Revit view. If we set the run mode in Dynamo to automatic then we can change the number of inserted instances based on the length of segments by changing the value of the Number Slider online.

# Workflow: Family Distribution Part 1

Today we will talk about how to distribute instances of a Revit Family uniformly along a predefined path using Dynamo 0.9.2 in Revit 2016. The path could be either closed or open.

First open Revit and make sure that the Family you want to distribute is loaded.

In our example we will use the Family “Chair” and distribute it once along a curved line.

For this lesson we will draw a model curve to use it as a guide for the distribution path, divide it into equally spaced segments then insert the “Chair” Family at the end point of each segment.

So as we planned the workflow logic in our mind we can find the nodes that are needed to implement it. Now we will open Dynamo and create a new Workspace. From the Categories Search find the following nodes:

• Select model element
• Curves
• Divide Equally
• Number Slider
• EndPoint
• Family Types
• ByPoint

In order to insert a model element  from Revit environment into Dynamo environment we shall use the ”Select model element” Node, so click on select and from Revit project pick the model line.

After the Model Curve is brought into Dynamo we need to extract the Curve geometry from it so we connect the ”Select model element” Node output to the “Element.Curves” Node input.

The curve geometry is ready now to be divided so we will connect the output of the “Element.Curves” Node to the input of the “Curve.Divide Equally” Node input.

To determine the number of segments needed we will connect the “Number Slider” Node to the “divisions” input in the “Curve.Divide Equally” Node.  By changing the slider value the number of divisions will increase or decrease respectively.

As the curve has been segmented we need to locate the end points as they will be our insertion positions for the “Chair” Family instances. So connect the output of the “Curve.Divide Equally” Node to the “Curve.EndPoint” Node input.

Now from the “Family Types” Node select the “Chair” Family Type and connect it to the “FamilyInstance.ByPoint” Node.

The last step before hitting the “Run” button is to connect the insertion points coming from the “Curve.EndPoint” Node into the “FamilyInstance.ByPoint” Node.

We can hit “Run” button and see the result in the Revit view. If we set the run mode in Dynamo to automatic then we can change the number of inserted instances based on the number of segments by changing the value of the Number Slider online.

# Workflow: SRTM Data to Topography in Revit

Overview: This workflow allows the user to source SRTM Data in GeoTIFF format from http://earthexplorer.usgs.gov/, and use it to create topography in Revit. Shuttle Radar Topography Mission (SRTM), was carried out by Nasa in 2000 and recorded elevation data. This data has been made available globally at 1 Arc Second, and in more detail at 1/3 Arc Second for some parts of the US.

Packages: ‘Elk’.

# DynoPresetInputGenerator

This node is the first of a group of three nodes. They are meant to help with the creation of the preset file, which is a .JSON file.Refer to the workflow post for further details.

###### This file defines for a given “preset”, the inputs which will be accessible from DynoBrowser panel.  see more at http://dyno.arcprojects.ru/

With this node, you define an input.

It has three inputs; Name, Value and Description. The node will look for the data type and write it accordingly.

The string creation is held by a python script node:

You can define more than one input, and lace them together into a list and pass it to the next node, which is DynoPresetGenerator.

The author of these nodes is no affiliated with DynoBrowser developer. Refer to http://dyno.arcprojects.ru/ for more information

# TextElement Modifiers

This covers the three text element modifiers. Dynamo covers this OOTB for strings, but not for text elements directly.

Input = TextElements (Single or list)

# Form.ByLoftCrossSections

Form.ByLoftCrossSections is one of two OOTB Dynamo nodes available in Revit that produces a type Form geometry (native Revit geometry). It requires the input of a ModelCurve which you can get from either a Modelcurve.ByCurve or a ModelCurve.ReferenceByCurve. You can only use this node in a family as both the ModelCurve and Form.ByLoft nodes will only work in family environment.

If you pass a false into the isSolid you will get a void rather than a solid.

If you need a more complex geometry in Revit, take a look at the Form.ByGeometry node from Spring Nodes.

# Rhino to Revit (SAT to Spring Nodes)

1. If you are in a family environment it is as simple as this:
2. If you are at the project level of a Revit project then there is a just a bit more that needs to be added:

In the end though, the results are pretty much the same. You should end up with native Revit, free form elements, some of which will even display handles which can be used to edit this geometry (usually simpler, rectilinear geometries such as boxes will be fully editable, other times things like lofted geometries might have and end face that is editable).

Be aware that there is a scaling issue currently with dynamo’s SAT import nodes where the they only read the geometry as though it were in meters, but this can be easily fixed through some creative scaling before “baking” it into Revit.

This workflow can also be used to bring SAT information into Revit from Inventor as well.

# Enumeration

Feed a List into this node and it will return a number range, starting at 1 and up to the total count of the given List.

Useful to renumber Revit elements, as in this example, where it helps generating the numbering of certain Rooms in the model:

It is built mainly with OOTB nodes and one custom node. It operates a Count method over the list object, and using this value to generate a number range from 1 to the obtained count. Last implementation avoids unexpected behavior when the input list is empty. In that case, now the output is an empty list.

# Element.FilterByParameterValue

This node gets a list of elements [list], a parameter name[string] and a parameter value [].

Checks if the elements parameter is equal to the given value, and splits the elements list in two: the first been “true” and the second been “false”

This node is built using OOTB nodes with nothing special in it.  But sumarizes a task we do in almost every definition.

Here follows a little example of this node in action:

We input all the rooms in the project, then get only those having “Comments” parameter equal to “revestir”