Select only certain duct fittings

Hi All,
I have a duct run which has different types of fittings. Is it possible to select only certain duct fittings. I would like to select only bends and elbows for auto tagging and dont want to select union fittings.

Thanks in advance.


image

This should be a simple case using OOTB filtering nodes…
Try gathering elements from the system and filtering using your specified criteria. (E.g. Family name, Fitting Type)
These parameters should all be discover-able using Obtain All Parameters from Element
That should be a good place to start :+1:

1 Like

Thanks Ewan, will try that

Hi Ewan,

Can you please let me know if I need to install a package to get the OOTB fitting nodes ?

OOTB stands for “out of the box” these nodes are the base nodes included with any Dynamo installation.

3 Likes

You can also try this node from the MEPover custom package to get you started:

3 Likes

How do I select only certain fittings from MechanicalFitting node and pass that to create tags. Our template has around 50+ different types of fittings of which I only need to tag 37 types. I can select each family type and select all elements to create tags (pic 2 , works). This works but, I have to create 37 of these. Please let me know if I am missing something or if there is a better way of doing this.


This is what I am doing to tag fittings

This is what I am doing to tag ducts

@ahulimavu I’d probably use Select All Elements of Category (like @T_Pover showed above), and input the list of elements into GroupByKey, then query the elements’ family types to use as the keys input on that node. Then it would supply you with sublists that are elements belonging to all of the same Family Type. Wish I could show you graphically but I’m not on a computer with Dynamo at the moment so here is the first image I could find from a previous post thats halfway there (ignore the sort by key node):

imagehttps://sea2.discourse-cdn.com/business6/uploads/dynamobim/optimized/3X/5/7/574500dde3bd268fd7a2772fde42ae8cda383982_1_690x349.jpg

you would feed your elements from the by category collector into an ElementType node ( http://dictionary.dynamobim.com/#/Revit/Elements/Element/Query/ElementType ) then use that node’s output as the input for “keys” on the List.GroupByKeys node

1 Like

@awilliams, this is what i get when I run. Am i missing something

@ahulimavu Yes, you’re missing something :grin: See the link I posted above about the ElementType node. It should show up if you search your library. You will connect your output list of Elements from the “All Elements of Category” node to the “ElementType” node, and then use the output from that as your input for keys :slightly_smiling_face:

1 Like

@awilliams, I am new to dynamo so please bare with me. :grimacing:
Am I going in the right direction?

1 Like

@ahulimavu yep that is what I was describing! Now the output of “groups” will be a list of all your duct fittings, in sub lists based on their Family Type. Run that groups output through another Element.ElementType and you will see.

After you check that, to help you to progress with your goal of tagging, is there any correlation between the naming of the corresponding tag family types and the family types they are used with?

EDIT: my last paragraph may be due to misinterpreting your initial issue. Does each family type have a different tag or do they all receive the same duct fitting tag? If the answer is they all have the same tag, disregard the last paragraph

1 Like

@awilliams awesome :+1: now the fittings have been sorted by type. How do I now exclude certain items form the list?

I want to exclude, endcaps, union fittings and a few other form the list and want to pass the rest. Is there a way to do multiple if statements?
No there is no correlation between the tags and the families, we use one duct fitting tag to tag all the fittings types.

Yep! Run your groups through the node that @T_Pover referenced (you will have to download the MEPover package), then you can use the != or == node with FilterByBoolMask

EDIT: you could also use the workflow recommended above that utilizes the MEPover node before grouping by family type.

1 Like

@awilliams thanks for the info, != node returns untill there is value in y input. Example, the first MechanicalFitting node returns all the fittings (231 elements). The second returns only union fittings (141 elements). The != node runs only 141 times but not 231. How can i fix this?

I believe this is what @awilliams suggests:

That will group the all the duct fittings by their part type. So for every part type you get a list.
To double check you can do this:

1 Like

Or filter by string, like this:

2 Likes

Thanks @T_Pover, I’m not at a computer with Dynamo so couldn’t show graphically but yes @ahulimavu that was what I was describing. And then if you connect “in” output from the List.FilterByBoolMask to “Element.ElementType” and use GroupByKey, you can get sublists of each family type, that only includes the part types you want

2 Likes