Schedule Door with Dynamo



Hello everyone, I am new to exploring and studying Dynamo. I have an idea to create a Dynamo script that can use the Legend components I select, then match them based on the family name (the component type attribute in the legend) with the Door Schedule I have already created. From there, it would extract parameters such as Type Mark, Level, Count Total and Dimensions (dimensions would be Width x Height, available from the Door Schedule). All these parameters would then be populated into another family with corresponding Label attributes.

I feel that creating this Dynamo script might be a bit overwhelming for someone new to Dynamo like me. Therefore, I am creating this topic in hopes of receiving a lot of support from Dynamo experts to help me realize this project. Once again, I sincerely ask for the experts’ assistance. Thank you very much.

Ok best first step is to do your workflow 100% manually. Take note of each step along the way, list them out in order. Ask yourself at each step what is the required inputs, and what is the output. This will become your schematic to develop a script based on. Failing to plan is planning to fail.

If you are 100% new to dynamo, the dynamo primer is your first point of call:

This contains many fundamentals you will require for most types of scripts. Dont skip it, dont rush it, dont neglect even once you become more experienced. Even the most experienced of users tend to miss things the primer covers.

Your task is a difficult one and needs more thought around what things are being done at the revit level. E.g. is the block of text under your door just a bunch of lines and text, a schedule, or a custom family with labels in it? Many ways you could go about this.

It sounds like you are leaning to label based families, so learn about get/set parameter values by name. Try to get a door type based on a legend component and pass its values to a family as a first exercise after the primer, which contains all those steps. From there youll want to go back and look at dyamically generating a legend component (hard) as well as placing the family under it (easier). Finally how to get the related door type and refresh/update family values. A hint here is to store the elementid of the type to the family itself as a parameter value, which can give you access back to the type it relates to.

The more you show you have done, the more feedback you will get. Typically we like to see a good first attempt vs ‘where do i even begin / i dont know dynamo’. The primer is your avenue to moving beyond that point.

5 Likes

I have read documentation and explored YouTube tutorials on how to create an automatic schedule using Dynamo (specifically a Door Schedule). However, I am currently stuck at the step of sorting data in Revit. Doing it manually is quite straightforward, but I haven’t found any guides or resources related to sorting data using Dynamo. Can you provide some documentation or a solution to help me continue my research?


Check the dynamo primer sections on sorting and grouping by key.

Remember a schedule is just a representation of model elements. You dont necessarily need this, focus on getting elements and their data instead.

If you havent yet, also look into filterbybooleanmask in the primer. That is a crucial node for filtering down to needed elements.

Id suggest potentially beginning with a single door, and trying to connect that to a single family with its data. Then take a step back and try multiple doors. Finally build the logic to collect the needed doors and generate their note families before populating their data. Dont start at the end - it will be too complex.

1 Like

This is a bit of an understatement, so I’ll piggy back.

@nguyen.duy.quang.993 since you are populating another family (a label?) with data from one family (door types), the schedule is entirely unnecessary - get the door type, pull the desired parameter values, push them into the other (label?) family. Two nodes which will help:

  • Element.GetParameterValueByName to get the data from the selected door type
  • Element.SetParameterValue to set the values in the other (label?) family.

The only ‘hard’ part is getting an association between the given door type and the other family; not sure how you have that mapped.

2 Likes

Haha yes i was going for a softer handed approach there. I agree with all of that though.

I will add that when i first learnt dynamo, i used to set up schedules as well to help understand what i was doing in dynamo. If my actions on the schedule matched what I saw in dynamo, i knew i was on the right track.

If you look at a row as an element, columns as parameters that hold values in cells per row/element, then look at filterbybooleanmask as each filter in the schedule it can sometimes make for a nice companion technique until the nodes make sense. Type parameters obviously are a bit ot a muddier aspect though.

2 Likes

Thank you and GavinCrump for suggesting two basic nodes to help me implement my idea. I will study how to filter data and connect these two nodes according to my concept. I don’t know what challenges may arise during the process, but I will research and try. I hope to continue receiving guidance from you all.

2 Likes



Hello Jacob Small, after some time researching and studying the materials, I have finally understood and managed to use one of the two nodes you suggested previously. Based on the Element.GetParameterValueByName node, I can only extract the Family Name attribute when selecting a Legend Component Door. Other attributes such as Type Mark, Count, Level, Width, and Height cannot be found in the Legend Component. However, the attributes that cannot be extracted using Element.GetParameterValueByName can be obtained through a Schedule, as I mentioned in my previous response.

Currently, I am stuck at the step of figuring out how to combine the data extracted from the Schedule and the data obtained using Element.GetParameterValueByName so that I can retrieve the remaining attributes of a specific Legend Component. Could you suggest what I should do or where I can find relevant documentation? Alternatively, could you recommend a specific node that I can research further? Thank you so much for your help!

The schedule isn’t the legend components, but model ones.

If you look at the resulting data from the value of the GetParameterValueByName node for “Component Type” I think you will start to see the path forward - it’s cut off by the data preview though so consider a watch node. A watch node might help here.

I don’t quite understand what you’re trying to convey. Is it something like this?

The door schedule is showing information of a family type.

The parameter value I indicated is a Family type.

Ergo legend component > family type > parameter values.

I’m starting to understand the issue: a Schedule cannot directly link or match data with an Element. I’m now shifting my approach to finding and filtering objects with the desired name and counting the total number of objects whose names match the Family Name extracted from the Element.GetParameterValueByName node of the Legend Component. However, as shown in the attached image, I’m unable to generate a complete list of all the doors currently present. As you can see, I have 2 doors labeled D-01, 1 door labeled D-02, and 1 door labeled 32. How can I create a complete list of all the doors present in the Revit drawing?

You may check this out.
I tried to replicate this and it is working. My problem is I cannot select multiple doors and generic annotation at the same time. the data connection is lost

Tagging a Legend in Revit

Hi @nguyen.duy.quang.993 you could try use group by keyto group all your doors by TypeMmark and then grab count from that

1 Like

Hello Kai and everyone supporting me in this forum. I have successfully counted the types of doors I wanted based on the guidance from everyone in the past few days. Currently, I want to compare multiple strings and filter out the common elements between them. I tried using the List.SetIntersection node, but it returned a null error. I think I might have missed a step somewhere. Could everyone please explain further how to handle this case?

Update on my research. I saw somewhere online how to use this node to get string. Can’t believe it gave me perfect result than I expected

Hello Jacob.Small and everyone in my forum. In the past few days I have been researching and achieved some expected results, only one small problem remains. Currently I want to filter the objects starting from the output list of the All Elements of Category node, but the result is Empty, can you and everyone explain why to help me?

Not sure what you mean by this.

One tip though. Read what a node does :upside_down_face:.

I guess / think List.SetIntersection is not what you need (you are also not ‘comparing’ the same Object.Types. In example Strings with Strings.

If you want to filter out a certain Family Type. You know how to do that. You have done that before by looking at your previous screenshots :wink:.

2 Likes

Hello Bvs1982, Thank you for pointing out my error, I currently want to filter the object, not the element type. The reason is because I want to get the parameter (Level) for processing, as the image I attached, the element type does not contain the parameter (Level). Do you have any way to help me filter the object?

I guess this is what your after.

  1. can be any Node (i.e. to get the Elements Level).
1 Like