Re-center Room object origin to centroid?

Can someone tell me if Dynamo can re-center the origin of each room object to the centroid location?
It happens frequently that during the course of design, when walls that bound room objects are moved around, the room object origin isn’t moved to stay roughly centered in the room. While not a big deal some of the time, it causes a lot of manual relocation of room tags when someone goes in to “Tag all not tagged” and the room tags go to the origin location which may have evolved to be right near the edge of the room.

Thanks in advance!
Matt.

Custom nodes available in Rhythm package.

3 Likes

Great. I’ll give that a try.
Thanks John!

1 Like

And the OOTB way of doing it.

3 Likes

John,
So I got it working as intended, with a bonus outcome of finding wayward room objects. By adding the watch node, I learned that I had 37 room objects in my project, but only 11 were in the current phase. The other 26 weren’t supposed to be hiding on another phase.

This brings me to a few follow up questions:

  1. How do I restrict the script to only recenter room tags in the current view… What node do I add to do this?

  2. Also, as you can see, I have an error message on the RoomTag.Center… node. It says “unable to cast object of type” (Is it possible to screenshot error message content?), but the script runs and does what its supposed to do.

  3. I did a “select all instances in file” on the room tags and deleted them all, then I re-tagged each of the 11 rooms in my practice project manually, but the script watch node says there are 12 tags… If I click on the top tag (0) in the watch node it doesn’t take me to the tag in my Revit file (it does nothing)… the other 11 in the watch node DO take me to each of them when selected. What gives?

Thanks again!
Matt

5 posts were split to a new topic: Center Room Object + Tags

A post was merged into an existing topic: Center Room Object + Tags

A post was merged into an existing topic: Center Room Object + Tags