Tag all rooms in all or selected views from linked architect model

I am trying to get a script working that will tag all rooms from a linked architect model in all views. I would eventually like to change the script to allow the users to select the desired views for the tagging to be done on but one step at a time.

My current issue is that the annotation tag node says it has created the tags and if I search by element ID in the revit model, it says it exists however, I cannot view or see the tag anywhere. When I try to select host, no room is selected (as if the room tag is not actually attached to the room).

I am wondering if the coordinates of the rooms from the linked model are not lined up with the model. I would like to one day to turn this into a revit plugin instead of a dynamo script. Please see a screenshot of the workflow below:


hi @Paul_Vandenberk ,

I snoop via linkedElement.Location…

KR

Andreas

Hello @Draxl_Andreas,

When I use a similar node the x,y,z coordinates come out the same as what is output from Element.Location+. Both result in the tags not appearing on the views.

Is anyone able to help further with this?

This logic should work…

host model.rvt (1.4 MB)
linked model.rvt (1.4 MB)
script for tag link rooms.dyn (23.7 KB)

2 Likes

@GavinCrump Thank you. I will try this later this week but use a node to gather all views and try it. Will get back to you with my results.

1 Like

@GavinCrump It looks to work. I need to put in some additional filtering to ensure the number of coordinates matches with the number of rooms but so far so good. I did notice that the x, y, z point values from the coordinate transformation matched the output from the element.location+ node. Not really why this solution works and my original didn’t. Wondering if it was the Create Annotation Tag node? Interested in hearing other people’s theories as to what was causing the issue in the original code setup.

To piggyback on this topic, @GavinCrump @Alban_de_Chasteigner can you please point me in the right direction. I have a linked model consisting of hundreds of rooms in multiple floors and I want to simply get the linked rooms only in the active view.

My understanding is that the only way is by getting the view/room solid intersect using BooleanOperationsUtils.ExecuteBooleanOperation method.

But would like your suggestion as well.

Thanks

If you know what the room will be called you could use a Filtered element collector to get all rooms from that linked document, then get their level name and include them only if it matches the desired one. No intersections needed, just good data.

1 Like

Hi,

No need for intersections.
Use a SelectByCateOrTypeAndView node with your link as input to collect your linked rooms or hte SelectByCategoryInHostView node.

2 Likes

The arch has also created core rooms (stairs, shafts, etc) that cross the view’s level also and do not match the level name. How can I accoutn for these rooms? I thought I already tried getting them by their height but ran into issues. Please help here.

@Alban_de_Chasteigner I tested both nodes from Genius Loci 2022.9.16 and only SelecByCategoryInHostView resulted in 204 linked rooms. There should be 234 linked rooms in the view (based on room tags). Wondering what happened to those missing rooms.

Thanks