Maciej Główka
Blog Games Contact

← Return to Blog Index

Aug. 19, 2020

Tag rooms in multiple views

revit api dynamo

So recently in the comments below post on tagging through multiple views some questions have been asked about doing same for rooms. For some reason room tags in Revit are a different kind of element than other tags.

Anyways, I have tried to give an answer in the comments section but it didn’t seem to work. So I have tried one more time and now it works! (at least in Revit 2019). Here is the Python code:

The main difference is of course doc.Create.NewRoomTag function, which is room tag specific. One tricky part – as an argument you have to pass LinkElementId of the room – regardless if it is located in the current or linked model. The conversion from regular element Id is done through:

rId = LinkElementId(r.Id)

You can also download a .dyn file below. For simplicity I have used some archilab nodes to collect the views – but it is not necessary for the script to work.

If Python is not your thing you can always try our Onion Nodes. Element.FindNotTagged node can help you achieve same result easily.

roomTag.jpg room_tags.dyn
← Generating schwarzplans with Machine Learning Purge view templates in Revit→