DOOR RENUMBERING

April 6th, 2016 Posted by Download, Dynamo, Revit, Tools 9 comments on “DOOR RENUMBERING”

designtech are always looking to develop new tools or enhance software currently out there. When I first started developing Dynamo definitions over three years ago, the tool wasn’t particularly stable but it has since come on a long way and much of this is down to the development team and community helping to build and improve Dynamo on a daily basis. Dynamo offers functionality to Revit, that would have been previously difficult to comprehend.

Much of the work I have done using Dynamo since its inception, is related to improving efficiencies in workflows. I have been sat in an office many times only to grow frustrated at seeing highly skilled architects or engineers wasting time doing mundane and repetitive work rather than designing. Using Dynamo to facilitate a more proficient workflow in an office is where I see the real value of this tool.

A few years back there was a post from William Wong, formerly of CASE, now WeWork, that renumbered rooms based on a curve. In large projects this type of tool can be extremely beneficial and can save the end user a vast amount of time. This seemed like a step in the right direction for renumbering elements in a model, but when I came to use a similar approach to renumber doors, this particular example didn’t work in the required way. The main problem I noticed was that this method required the curve to intersect each room and so similarly to apply the same principle to doors I would also need to draw the curve through each door. As you can imagine if I’m working on a large project, drawing a model line through each door would arguably be just as time consuming as numbering them individually. Not to mention if I accidentally miss a door and then have to begin to redraw the curve from the beginning. It was this thought process that lead me to start thinking about whether we could use a proximity ruling rather than an intersection function to reorder the doors.

The image below shows a simple example of how this principle works. The red line indicates the curve and it is drawn from left to right. We want the doors to be renumbered in the same direction as the curve, so we need to find the the parameters on the curve and then find the closest door to each.

The next few paragraphs shows an overview of the completed script I wrote that references a model curve and renumbers doors (other elements such as rooms would work equally) based on their proximity to the curve, and how to use it on your projects. The link to download the script is at the bottom of the article.

At designtech we use a standard template that documents how our completed scripts are annotated within the definition. This includes information such as the author, a small description of what the script and any dependant packages that need to be downloaded. This helps the end user, who may have not built the script, have a quick understanding and knowledge of how to implement the definition. We also use a colour coding scheme to group nodes into what function they are performing. A simple traffic light system, green indicates an input, orange indicates the workings of the script, and red indicates the outputs. This methodology has worked fairly successfully so far.

As is often common practice when organising scripts, all of the input nodes are on the left hand side grouped together and then the data flows from left to right to run the definition, with the outputs on the right hand side. The inputs are annotated with instructions to ensure the information the end user is inputting is correct and in the right format.

The first step of the script is to draw a model line in a plan view in Revit. In the example below I drew a simple spline. Notice that you can be as precise as you wish or you can draw a fairly rough path like I have. As stated earlier the curve does not need to pass through the elements we are attempting to renumber, but for a more accurate numbering method, draw a more comprehensive curve.

The first required input in the definition is to reference in the curve that we have just drawn. We do this using the ‘Select Model Element’ node. Notice that once we select the element from within Dynamo, the element ID for the curve is displayed at the bottom of the node.

The second input requires the user to select the category of the elements we are trying to renumber. In this example we are changing the individual numbers of each door and so we use the built in node to select the category of doors from the drop down. By default this is automatically set to doors but the script could be altered to change other elements such as rooms.

The third input allows for a greater level of flexibility to choose whether the script includes all placed door types in the model, or we remove some from the process. An example of this may be that we want to renumber all internal doors but not include the doors in the building envelope as part of the same scheme. Or we may want to group and number doors based on their particular type or manufacturer so this part of the script allows us to filter out doors by their type names. We can choose to exclude as many different types of doors as we wish or toggle the boolean input to include all doors.

The final input part of the script allows the user to specify whether they number the doors on a level basis, and whether to include a prefix or suffix. By default the script is set to number doors per level, and we select the current level of which the doors are on from within the dropdown. It’s worth noting that we can select any level present in the model and the script will only run on doors placed on that level. Therefore it is important to do a quick sanity check on the model, to ensure all doors are referenced on their correct levels. In the 3rd box we can specify the text or numbers to be used as part of either a prefix or suffix when renumbering the doors. For example we might want all the doors on the ground floor to begin with 00-***, and then doors on level 1 to be 01-*** and so on. The boolean toggle at the bottom allows us to quickly switch between prefixes and suffixes.

That concludes all of the required inputs to run this script. There is a couple of features within the workings of the definition that I want to briefly touch on. In particular how curtain wall doors differ in their behaviour to loadable families. In many scenarios we will use a combination of both of these types of doors within a project and so we need to cater for both. Loadable door families are placed on a work plane and so reference the level in their parameters. However curtain wall doors dont have the same parameter in them. As they are hosted within a curtain wall the only way to get the reference level is extract that information from the hosting wall.

The ‘Doors at Level’ working part of the script handles this process, finding doors that have no reference level, making the assumption these doors are curtain wall doors, so then finding their hosting element reference level.

The script computes the location of each door that is to be included in the renumbering process and uses a combination of the ‘Geometry.ClosestPointTo’ and ‘Curve.ParameterAtPoint’ in relation to the model curve we drew.

This should give us a list of floating numbers between 0 and 1 as shown below. These numbers in essence are a reporting number of proximity for each door to a parameter on the curve between 0, the start point of the curve, and 1, the end point of the curve. This provides a visible way of ensuring the script is running correctly. If numbers do not look like the image below, then consider revisiting the inputs.

The final parts of the script then group this information with each door and sort them based on the number, rearranging the doors in the correct order. With the doors now in the correct order we simply create a range of numbers and include our prefix/suffix and write this data into the door parameter, Mark.

Once we run the script we can see the changes take place in the model. This benefit of setting this script up, is that it can be run as many times as necessary and gives the user different levels of flexibility and options in how they choose to number the doors.

Below shows a short video of the script in action. Please feel free to download and use this tool and please pass any comments onto to us at info@designtech.io

Enjoy 🙂

Tags: , , ,

9 comments on “DOOR RENUMBERING”

Thanks for sharing this. I appreciate the amount of time and effort that went on to put it all together.
Very helpful!

“Great Blogpost! Hi there! This is my first comment here so I just wanted to give a quick shout out_ and tell you I genuinely enjoy reading through your posts. Can you recommend any other blogs/websites/forums that deal with the same topics?”

Porreye Andreas says:

This is awesome! I have only one question: how do I describe the doors I want to exclude? In schedules the doors appear as: Family Name: Family Type. When I describe them the same way those doors are still included? Am I doing something wrong?

Mark Thorley says:

Hi Andreas,

Just type in the actual door type name and nothing else. This will need to be case sensitive to work. Ensure the correct number of inputs are specified in the List.Create node. Let me know if this helps.

Andreas says:

Dear Mark,

That helped! Thanks for your response and tool!

Best regards,

Andreas

Pete says:

Great Script!

Any way of removing the generic model line after having run the script?

Mark Thorley says:

Hi Pete, In theory you could wire the original Select Model Element node into a node at the end of the script that deletes it. I believe both the archi-lab and spring nodes package have a node to do so. You will however need to use either a pass-through/wait node or transaction end node out of the last part of the script before you delete the model line. In essence ordering Dynamo to run the closest point calculations prior to deleting the line.

waleed hussain says:

Hey, doesn’t the generic line automatically go away if you save and reload? That’s what I’ve been doing. The generic model appears in many other scripts I encountered.

Also, I tried switching the category to Room from doors and changed the setparameter value to “Number” but to no avail. Any ideas?

Thanks!

Adam says:

Hi!
I really like the idea of this thingie!
I could get it work really easy, Is there a way to set up the starting ID/Mark number?
I would like to go by “Per Level” tub i also need to continue the numbering…

so example:
i start on gnd floor and my last door on gnd is “67”
How can i set up for the next code running to start from “68” ?

may thanks in advance!

Leave a Reply

Your email address will not be published.This is a required field!

<small>You may use these <abbr title="HyperText Markup Language">HTML</abbr> tags and attributes:<br> <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>