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