Separate ducts and duct fittings in active view

Hi All,
Is it possible to get all the elements in a view and sort them by categories? I am trying to separate ducts and duct fittings in active view and then add number tag to duct and other tag to duct fittings.
Thanks in advance.

Entirely possible. Have you got thee #springnodes package. This has the node Collector.ElementsInView that you can use for step 1. The a simple filter by Category or list of categories can be handled by a boolean filter. The last step can be handled by the standard SetParameterByName node. If you are new to Dynamo then I would advise setting aside some time when you are not pressured to deliver work, to just play around, dig in the sandbox if you will, and see what you can find. Once you get into the dynamo thought process, its hard to go back :slightly_smiling_face:

1 Like

Sure, there’s a node in archi-lab package and one in MEPover package that do the same:

1 Like

Thanks Ewan both your and @T_Pover method works as I want. And Yes I am new to dynamo and revit. I have been using both regularly for a month or so. I see there is a lot of potential in dynamo and have to spend time understanding the basics.:+1:

1 Like

It’s great that you got the answers you need. This forum is not only a place to ask for advice but also a kind of database that everyone contributes to feed. Please consider sending your graph and/or some links from your preliminary researches with your next request, it’s a good habit that also helps to keep requests for free works away. Thanks :slight_smile:

1 Like

@Yna_Db :+1: I have some final twerking to do and once complete I will post my graph

Awesome. If you post in the #share category then it will be easy for others to find your work when they are searching for inspiration :slightly_smiling_face:

The graph works as I want, It put the number tag (mark value) for duct and duct fittings. Any Suggestion to improve? I didn’t have to use Select.BycategoryAndView or Element in View by Category as the create tag node created tags in the view I selected.

@Ewan_Opie I am still new to dynamo forum. How do I share it? I have attached the graph below.

You will need to create a post with some background information and embed the link (copy the http: address) to this topic. This option can be found in the top bar when writing a post. Next to the title of your post there is an option box in which you can type the forum category (revit, packages, share) which the post predominantly relates to.

The share category is best used for posting full workflows, as this is a more defined section within the forum. The post should describe what your script is for and a picture of its structure is always a good idea. Take some time to ensure your hard work can be easily found by others who need some help. :slightly_smiling_face:

@Ewan_Opie Thanks for the info. will upload asap.

This is what I am trying to achieve once I complete the graph. I have the duct number sorted but am struggling with placing size in top RHS and length in bottom and elevation in LHS. Any suggestions?

Could you send a screenshot of your graph?


I want to only output duct lenths that are smaller than 1400
duct-length.dyn (22.9 KB)

You could try to feed the false input of the If node with your list of elements, the true input with a null value (use a String node), and perform a List.Clean just after that.
Seek also in the Dictionary what could help you further:

@Yna_Db the graph outputs the length but it is not placing where I want it. I want the length to be in bottom right hand side of the duct

This is not clear to me, please try to elaborate

Sorry for not being clear, We have a standard for where we place length, size and elevation of ducts. I am struggling only with the placement of these tags. Sorry for my bad writing on the pic.

Hi @ahulimavu
this node “Create Annotation Tag” from which Package ?


It is from the #archi-lab package.