Workflow: Manage coordination between spaces and rooms

Original post at: Space-Room coordination

The following workflow uses custom nodes from the packages: “SpringNodes”, “Archi-Lab”, “SteamNodes” and “MEPover”.
There are a few things to consider when managing your spaces:

A: Make sure the levels between the host model and the linked model are aligned;
B: Make sure the levels share the same computation height;
C: Create and coordinate spaces and rooms;
D: Set the limit offset of the spaces.

A. Aligning levels
The first one is easy as this is usually done when setting up your model. I take it everyone knows how to use the copy/monitor function, so let’s skip this step.

B. Set computation heights
If you only have a few levels in your project it is no problem: just manually check the computation height of the linked levels and the host levels and set the same computation height. However, if there are a lot of levels, Dynamo can come in handy. Here’s a simple workflow for setting the level’s computation height:

  1. Find the levels from both the host model and the linked architectural model
  2. With a dictionary you can create a list of keys and a list of associated values. In the example above the keys are the elevation values of the levels from the host model and the values are the levels themselves (also from the host model). After that the ‘search keys’ will look up the values associated with those keys.
    The level elevation values from the linked model are used to return the levels from the host model. By using this workflow you will be able to match levels from the linked model to levels in the host model. If however there are levels which can’t find a matching height, then a null value will be returned.
  3. Retrieve the computation height values from the levels in the linked model and use those to set the computation height of the levels in the host model. In this case the SetParameter node gives a warning, because there is a level in the linked model that can’t find a matching level in the host model (like stated in step 2). This doesn’t have to be a problem, just make sure there aren’t any rooms hosted to that level.
    If there are rooms hosted to that level then the next steps will fail as the spaces we are going to generate always need to be associated to a level.

C. Space creation and coordination
This is the hardest part. There is no single right way to manage the coordination between your spaces and the rooms from the linked model. If you are not in the same office as the architect it’s almost impossible to keep track of the changes in the linked model. It would mean checking every space that no longer has a matching room number and looking for that room’s new location or it could also have been deleted altogether.
I therefore put some thought into creating a workflow that would work for any situation, regardless of the changes to the rooms. The only prerequisite for this to work well is that every room has a unique room number (sadly I still run into a lot of architectural models with duplicate room numbers, even though Revit gives explicit warnings stating that this is actually a bad idea…).
let’s assume that every space has the same number as the room it is associated with. Now whenever you load a new architetural model, the spaces will retain their space numbers (basically the state of the old architectural model). All you need to do is find the difference between the new rooms and the existing spaces. There’s basically three options to choose from:
1: A room number has been deleted
2: A room number still exists in the model (and might have moved)
3: A room number is new

To gather the information above we can use a really useful data structure known as a ‘Set’.
Sets are a collection of unique items upon which you can perform some functions you can’t do as efficiently with lists. Luckily Dynamo has included a few nodes for working with sets. There are 2 important methods that can be used with sets: ‘SetDifference’ and ‘SetIntersection’. Explaining these is best done through an example:

As you can see, this way it’s possible to find out exactly what we are looking for. Now let’s have a look at the next challenge: associating room/space numbers with actual rooms and spaces. We can achieve this by using a dictionary in which the keys are the space/room numbers and the values are the actual spaces/rooms. The output of the dictionaries will be the data to use for creating, managing or deleting the current spaces. Here is the result (with explanation):

  1. First gather the rooms, spaces and their respective numbers.
  2. Use the SetDifference node (room numbers in input 1, space numbers in input 2) in order to have the new room numbers from the linked model returned. Those room numbers are used as input for the dictionary which will return the room elements. Secondly, get those rooms’ locations and use them for the creation of new spaces.
  3. Use the SetDifference node but reverse the input order (space numbers in input 1 and room numbers in input 2). This way the space numbers for which there is no longer a room number available in the linked model are returned. With the dictionary the space elements are returned. All that’s left is to simply delete these spaces.
  4. Find out which rooms and spaces with the same numbers are still in both the models, using the SetIntersection node. With the dictionary we retrieve the space elements. Because this doesn’t tell us whether the rooms and spaces are still in the same location, we need to check their locations and then move the spaces if necessary. Sadly Dynamo doesn’t allow moving spaces to different levels with any of the normal nodes. For this reason I created the node: “Space coordination move to associated room”. This node will find the room in the linked document with the same room number as the space. It will check its location and if that location isn’t the same as the space it will attempt to move the spaces to rooms with the same numbers.

After this make sure that the new space numbers change to match the associated room numbers. After that you can repeat this entire workflow for every new linked model update you receive.

CAD.SetObjectStyle | Bimorph Nodes

INPUTS
importInstance : ImportInstance
name : string
projectionWeight : int
Color : Color

OUTPUTS
report : string

DESCRIPTION
Set the weight and colour of layers in a CAD Link or Import (its Revit Object Styles). Enter the required layers as strings – note that layer names are case-sensitive.

The node includes built-in logic in situations where lineStylesWeight or lineStylesColour lists are shorter (contain less items) than the layerNames list; in these situations, the node automatically defaults to longest lacing to to map attributes to every layer input.

MORE INFO
Visit Bimorph Nodes for more information and downloadable example graphs

USER GUIDE

CAD.ReportInstances | Bimorph Nodes

INPUTS
filePath : string[] (optional)
refresh : bool
close : bool

OUTPUTS
report[][] : string[][]
CADLinks[] : ImportInstance[]
CADImports[] : ImportInstance[]

DESCRIPTION
Generates a report of all CAD links and imports in the active Revit document. The node provides detailed information on: instance name, link status, view specific, owner view id, workset name, file path and host level. Linked and Imported CAD links are output into lists to aid with CAD file management in Revit.

To report the active Revit document, leave the filePath input unconnected. To report any external Revit file or Family silently (without opening) simply input its file path using an out-of-the-box File Path node.

MORE INFO
Visit Bimorph Nodes for more information and downloadable example graphs

USER GUIDE

Sheet.Duplicate | Bimorph Nodes

INPUTS
sheets : Sheet[]
run : bool
duplicateWithViews : bool
duplicateOption : int
suffix : string
prefix : string

OUTPUTS
report[] : string[]
Sheet[] : Sheet[]

DESCRIPTION
Duplicate selected Sheets with options to specify the duplication of placed Views and the method of duplication. The node will identify illegal characters in View names (such as {3D} for example) and clean them automatically to circumvent unexpected failures.

The algorithm which controls the duplicate View behaviour has been designed so that dependent Views are duplicated from a newly created parent View to maintain the existing View structure. The node will also check if the parent View exists on subsequent runs to handle situations where any of its other dependent Views need to be duplicated.

The report output provides a detailed log of any Sheets that fail to duplicate, any Views that fail to duplicate or cant be placed, and View names cleaned of illegal characters.

MORE INFO
Visit Bimorph Nodes for more information and downloadable example graphs

USER GUIDE

LineStyle.AllAttributes | Bimorph Nodes

INPUTS
refresh : bool

OUTPUTS
name[] : string[]
weight[] : int[]
Color[] : Color[]
GraphicStyle[] : GraphicStyle[]

DESCRIPTION
Gets all the Revit Line Styles in the document and reports their Line Style Name, Weight and Colour as strings and integers. The Revit GraphicsStyle (Category) element for each Line Style is also output.

MORE INFO
Visit Bimorph Nodes for more information and downloadable example graphs

USER GUIDE

LineStyle.Create | Bimorph Nodes

INPUTS
name : string
weight : int
Color : Color
run : bool

OUTPUTS
report : string
GraphicStyle : GraphicStyle

DESCRIPTION
Create single or multiple new Line Styles in a Revit document by inputting names, line weights and RGB values.

The node is equipped with a range of user-friendly pop-up messages that report lacing issues and guide users through the creation process.

MORE INFO
Visit Bimorph Nodes for more information and downloadable example graphs

USER GUIDE

Schedule.GetDataColumns | Bimorph Nodes

INPUTS
scheduleView : View or string
columnIndexes : int[]
removeHeadings : bool (optional)
refresh : bool (optional)

OUTPUTS
scheduleData[][] : string[][]

DESCRIPTION
Get the specified column data from a given schedule as strings. Column indexes start at 0 and any input indexes that are out of range are ignored. Use the removeHeading input to specifiy if the headings should be removed from the returned string lists.

MORE INFO
Visit Bimorph Nodes for more information and downloadable example graphs

USER GUIDE