One of the difficulties of documenting in Revit is the inability to place rooms precisely in the centre of the room. Ideally, Revit would automatically snap to the centroid when in the process of placing a room. Instead, Revit just aligns adjacent elements. Since the reference crosshairs of the room are turned off by default, initially the position of the room may seem irrelevant. However, when attempting to ‘tag all not tagged’, Revit will place tags centred to the room’s location. This constraint means that drawings can appear messy and illegible. To solve this problem, Parametric Monkey has developed two custom Dynamo nodes. Both nodes are available via the Parametric Monkey Dynamo package.
The ‘Room.CentreLocation‘ node moves all rooms within the project to the centroid of the room. If you have an odd-shaped room, and the centroid is going to fall outside of the room boundary, the node will keep the room in its current position. Under the hood, the script collects all rooms within the project and their associated boundary. The centroid of the boundary is then calculated, and a containment test performed to test whether the new location (centroid) is contained within the room. If true, the rooms are moved to their new position with the rest remaining as-is.
Centring room tags
Once all the room have been repositioned, it is possible to move any existing room tags to the new room location point. While it is possible to use the ‘tag all not tagged’ command within Revit, you may have some rooms that either don’t need tags or which require a different tag family. By using Dynamo and referencing the tags already placed in the project, users have greater control over the outcome.
The ‘RoomTag.MoveToRoomLocation‘ node is based on the script by Modelical. However, the benefit of using this node is that it will automatically select all the room tags in the project.
The problem with having to select which tags to update manually is as follows. Firstly, using the ‘Select model elements’ node in Dynamo, you need to draw a window to reference Revit elements. It is not possible to have a pre-selection or use Ctrl to select multiple elements. The alternative, therefore, is to isolate the room tags for easy selection. However, it is not possible to isolate the room tag category solely. For room tags to be visible, rooms must also be visible. Therefore, having the script collect the room tags automatically is preferable.
Note that the script will search for any tags that contain the term ‘Room Tag’ in the family name. If you name your families something different, you’ll need to modify the node as necessary.
Any way this could be adapted to instead of shifting the room to its centroid, it could be leverage to report the placed center of room to obtain the length x width of its extents to that placed center location?
Hi Rob. Do you mean it reporting the rooms overall dimensions like 6x4m? This can be done by using a bounding box of the room. Or do you mean the width relative to the (uncentred) room location? This is possible too but how do you determine the width from the length? What scenario are you thinking of applying this to?
I’m thinking the way a slab direction tag works. This would allow you to grab length x width based on an uncentered non rectangular space easier.
I can look into it. Would it be better for the node to reference a detailed component, such as a setting out point, rather than the room?
I am having the old issue of this package upon installation using the Dynamo Package Manager the manager wants me to uninstall the archilab package. I tried to uninstall, install BVN package, and then tried to resinstall archilab package and it wants me to uninstall BVN. I saw on a forum to download the BVN package manually and then place the files in the correct directories however I cannot find a link anywhere to the latest BVN package files. BVN does not come up in a search on this sites package search engine. Where can I find the latest BVN files to download? Thank you.
Hi. Yes this is a problem with how the Package Manager works. What you need to do if installing via the package manager is to search for BVN and install. It will say that some packages need to be uninstalled first (namely Lunchbox and Archi-lab from memory). They will be marked for removal. You need to close Dynamo and Revit to fully uninstall them. Then you must reopen Revit and Dynamo and try to install BVN again. This will automatically install the dependency packages including Archi-lab. You don’t need to manually install this. Yes it is a pain.
To install them manually as you described. However, the BVN package has been depreciated as we are in the process of transferring ownership to another user account (as I am no longer at BVN) – again this is way harder than what it should be! So it can still be downloaded via the Package manager but not sure about the website. I’ll be launching a new package soon in the next few days which should address this issue.
Hi, I got this to work finally in Dynamo 2.0 and Revit 2017. The Room.CentreLocation Node contains the Lunchbox Room Element Collector Node. Within the Lunchbox Room Element Collector Node, there is a Python Script. I edited line 81 inside the Python Script.
1. Insert the Room.CentreLocation node into a new Dynamo script.
2. Edit the Room.CentreLocation node.
3. Inside the Room.CentreLocation.dyf script, edit the Lunchbox Room Element Collector node.
4. Edit the Python Script inside Lunchbox Room Element Collector.dyf.
5. Go to line 81, crv = seg.Curve and change it to crv = seg.GetCurve()
Update and save the two nodes and that should fix it!
Or, to make it easier, I’ve deconstructed both nodes and created the Dynamo script that is ready to run. You can download at my dropbox at https://www.dropbox.com/s/pwlwuzxx8pacp7e/DEN%20Center%20All%20Rooms.dyn?dl=0
Sine Lolk Andersen
Thant you so must for making it easy for people like me (just getting started with dynamo)
I have a question (hope it is okay) when I rum the script I get the following error from “List.SortSublists”
“Error: Custom node difinition is not loaded!”
Do you know what I need to load to get it working?
Sine. That node is from the BVN package. Are you using the Parametric Monkey package and nodes?
@Paul have you released your new package yet? Also is it possible to make the rooms selection based? I know it was said in the thread about the difficulties in selecting room tags selectively but can it be done with rooms?
Hi Jaysyn. Yes the Parametric Monkey package has been launched. However the node hasn’t been updated to be selection based. If you wanted to do this you would just need to replace ‘Room.GetAll’ with either ‘Springs.SelectElement’ or ‘Springs.Collector.CurrentSelection’.
Greetings from London. Sorry to bother you but I was wondering if you could help me with a little issue. I am trying to learn Dynamo and I have followed some instructions of your paper Everyday Dynamo. I have installed the BVN package, but when I try to insert certain nodes from it, the nodes do not have the TOGGLE input to them, although on the figures (on your paper), they do. Example: The node Room.CentreLocation, on your figure, it is shown with a TOGGLE input, but when I import it in my Dynamo file, it does not. (hence I cannot connect the Boolean node to it). Any help would be greatly appreciated.
Hi Antony. You should use the Parametric Monkey dynamo package instead, as per previous comments.
Maarten van Zutphen
Hi Paul. Thanks for the great script. I noticed the script doesn’t include rooms within groups. I am
quite new to dynamo an figuring stuff out. Is there a way to include all the rooms (also from for example linked files)? Thanks in advance!
That’s correct, it won’t work on model groups. And you won’t be able to run Dynamo when the group is in edit mode. This is just how the Revit API works, unfortunately.
It’s been discussed quite a bit on the forums already. The only real workaround is to ungroup, make the changes (with Dynamo), and then re-create the group but as you can imagine, there are lots that can go wrong with this process. You also won’t be able to edit any linked models. You’ll need to do this in the actual file.