Automating Desk Count in Room Tags

Hello All, i am venturing to build a workflow to achieve the following,

Currently we have a shared parameter associated with the room and our designers count and manually input the desk count in that field. The room tag then picks that information, from the room properties, and displays it in the tag. (Please see attached) I am looking for a dynamo workflow that grabs the furniture count from a room and displays it in a room tag. To start with i am interested in counting only one family (desk) and displaying that info in the room tag. Essentially automating that “24 DESKS” count, which is currently a manually input value.

Would appreciate any input,

Hi @Faizan,

It’s really better to show what you’ve tried with dynamo.

Archilab package has the perfect node for that “Elements in Room”


@Alban_de_Chasteigner thanks a lot for your prompt response. This is great, i was definitely looking for a direction to go in for this. I will get back to you once i start building this and have any questions!

@Alban_de_Chasteigner Thought i would give you an update, tried your solution and it worked like a charm! I modified the script slightly to fit our needs, added the ‘Filter Element List by Type Parameter Value’ to count specific items in the room.
Also, i noticed that for the script to function on my projects i have to first purge out all not placed/enclosed. I am now looking into merging both scripts.
Thanks again for your help!

1 Like

Hi All,

This thread has been very helpful thanks for the tips. I’ve very new to Dynamo and have tried to implement the script above but it appears to return a few errors… Any ideas what I’m doing wrong?

  • First issue - is the script only appears to list furniture within the 1 listed room
  • Second issue - trying to filter by specific furniture item is returning an empty list.

Hopefully the snapshots below help explain whats going on…


Hi Ashton,

Welcome to the forum.

You forgot the longest lacing on several nodes.
Please read the Primer :

@Alban_de_Chasteigner thanks for the tip! you were right, had missed that step…Still getting my head around how the different forms of list translate in functional use.

With that said, i’m feeling a little out of my depth with the following error:
“TypeError: iteration over non-seqeunce of type Family Instance”

Any ideas of what I have done wrong?

Try changing lacing to longest for “Elements in Room” node.

Thanks @Kulkul that seemed to helped with the count for both rooms… However i’m still getting an error message within the elements in room…I think this is then flowing on to affect my list count…

Argh! ! It’s been a long day…


@Ashton_at_Hierarchy Could you drop/Share here rvt file?

H_Element Count in Room Tag.dyn (25.8 KB)
Project1.rvt (2.0 MB)

Fingers crossed you can spot something that my eyes can’t! I thought I was getting a better idea on lists too!

It works perfectly at my end:

@Ashton_at_Hierarchy Try this DYN fileCountElement(ForAshton).dyn (5.1 KB)



Thanks for the tips along the way team, I’ve now managed to get the script working… for some reason I need to have “Elements in Room” set to “Auto”…Short, Longest and Cross didn’t seem to work when manually controlled.

I found Rhythm’s filter element by string value ideal for isolating specific elements.

Hopefully this helps someone in the future!


Revit 2019.2
Dynamo Core v.
Dynamo Revit v.

I am going to preface this by saying that I do not fully understand everything there is to know about Dynamo yet. I am still self teaching so please bear with my request for help.

Now I have done my fair share of searching for Dynamo help for counting elements in rooms and pushing that number to a parameter that can then be read by a tag for a particular instance for that family. Circumventing the fact that you can not use the system “Counts” parameter natively in tags.

This thread is the closest I have come however when I replicate the graphs shown in this post and I tweak it to try to make what I am trying to do work, It doesn’t. Can someone who is much more seasoned in Dynamo take a look and see what I am missing?

And what I am trying to do: (Where the tag format [Find Furn Qty’s in Rooms and Tag.dyn is Type Mark (FU_Counts))

but the results are this:

Basically, it is not writing the count of the elements in the particular room and changing the “FU_Counts” parameter of all the family instances in that room.

Maybe this isn’t even possible with the current API available?

I would appreciate any and all help with this.

Thank you


Find Furn Qty’s in Rooms and Tag.dyn (20.0 KB)

  1. Feed the Element.SetParameterbyName off the List.Clean node. You are probably mixing lists if one list has empty lists and the other is ‘cleaned’.
  2. The List.FilterbyBoolMask at the bottom (looks like its for observation-only?) should be short lacing, not cross product.
  3. Do youu want each furniture element in the room to be populated with this parameter? The older conversations discussed pushing this data to the Room, I just wanted to verify what your end goal is.

If this still doesn’t work, can you repost the updated version with all of the node previews visible?

Yes exactly. I want every instance of each furniture piece to be populated with the parameter. This way my interiors staff can tag any instance of a particular family and have the correct quantity of that family in the room to be in my tag.

The original post was to tag a room yes. Its the closest thread I found to build off of to do what I am trying to do. =)

Can you use the dyn file I attached? I can also do another screen shot with the previews visible

I did, but there’s an issue with my Element in Rooms node (for some reason each furniture is listed in each room, I may need to update my archilabs package), I replaced with Element in Space to verify my suggestions made sense.


So I edited the graph and took out the observation of the rooms. You were correct :wink:

I have attached my latest dyn.

So it is writing stuff to the parameter, I just have no idea where its coming up with the value. It is not counting the instances of a particular family in a room and then pushing that quantity to my parameter for the instances of only that room. It appears to be a random number. Do you think its due to lacing settings in one of the other nodes?

At the end of the day, the result I am looking for is for the script to count the family instances of a type in the rooms and push those quantities to all of the families types only in the room for tagging in. Then it would evaluate the next rooms elements and push the quantities to those families only in that room and so on and so on.

In this case (see screen cap 1 below) there are not 8 of the same family instances of type A1 in room A200, there are only 4. So the number in the tag from the FU_Counts parameter should be 4. Type B1 should be 2.

In Office C200, type A1 should be 1 and type B1 should be 1 because there are only 1 instance of each type in that room. Hopefully that adds more description to what I am looking for.

Find Furn Qty’s in Rooms and Tag.dyn (17.9 KB)

Right now it doesn’t differentiate type of furniture: you have it counting the total elements per room.

You’ll have to group the elements after the room organization step so that you can list.count per furniture type instead of per room.

Try ID-ing the familytype and then using that list as the Key to a Group.ByKey node.