Get Rooms from linked model in specified views

Hi, all!

I am trying to create a script for our electrical engineers, that takes all Rooms from linked architectural model and tags them in a given view. I was just wondering if someone might think of a simple workflow to do this…

Currently, I am doing the following:

  1. Get the linked Instance
  2. Set the views I want to tag all the Rooms in
  3. Get the view’s levels and match them with the ones from the link
  4. Get all the Rooms from these levels, recreate their geometry and transform their coordinates
  5. Check wether that geometry sits within the crop view limits and filter all the rooms, based on that
  6. Tag filtered rooms in the specified views

Since my workflow depends on lots of geometric operations, It will probably be quite slow when dealing with numerous rooms and views, so I was just hoping someone might have a more clever idea :slight_smile:

Hi!

What do you have so far?:slight_smile:

1 Like

Sorry, I should have uploaded the graph as well. Here it is :slight_smile:

Tag Rooms from Linked Arch.dyn (159.9 KB)

It was made in Revit 2021 and Dynamo 2.6

I have come to the point of filtering rooms by the matching levels and getting their geometry in order to check which are visible in the selected views. I have tried to do that with the isVisible node, but it seems like it does not work for elements from links. Basically, it’s almost ready now, I was just looking for a workflow that would work faster. To select the architectural link and the views you want tagged, I have used data shapes

Now I noticed Genius Loci’s Create Tag node might already provide a good solution for this. I will try it out

I’m working on you’re script, a tip: use category by name because the different versions can change the category:

1 Like

Is this what you need?

I created a group with the ask why you need that.
Tag Rooms from Linked Arch.dyn (129.1 KB)

Thx for the quick reaction :slight_smile: However, it does not work at the moment, as the node SelectByCategoryInHostView does not return rooms from links:

That’s what I tried first and it’s also the reason I went into this “why you need that workaround”

It works fine for me :slight_smile:

1 Like

Hello @danail.momchilov …here is a way with Datashapes and Genius Loci…probably it could work…

2 Likes

I thought this might be cause I am using a different version of Genius Loci, but it’s still the same after I updated it :slight_smile:

yes, that worked! Thx a lot, it’s much more elegant than my solution… What I find weird is the Create Tag node still returns an error:

But all of the rooms are tagged, so it’s not that important:

It tagged 10 Floorplans in about 2 seconds, so it works quite fast also :slight_smile:

1 Like

Allright…check for unbounded and unplaced rooms…here i use dataskapes…

When we use unbounded rooms node from data shapes the link element from bimorph isnt needed…here just use ootb nodes…

2 Likes

Actually, once I do this, it stops tagging elements, even though It reports that tags are placed. So I used Room Status node only to filter the Rooms list:

Only then I noticed it actually tags all rooms in all views, even though I chose only two:

image

Hello…dont know what goin on there…but try this one here…Just in case be sure you had room bounding on as her

TAG ROOMS LINK.dyn (39.1 KB)

PS…do you really have 3300 rooms ? from Arch

PS…do you really have 3300 rooms ? from Arch

I thought the same :rofl:

2 Likes

Yeps a very huge project i guess :wink:

2 Likes

Thx for your answer again :slight_smile: Yes, links are Room Bounding and unfortunattely, with your version of the scrypt it still does not tag any rooms, even though it reports that it does. I guess it has to do with coordinates, cause links are typically placed by shared coordinates in our case. Perhaps that is why when you use Linkelement.Location it gets the right one. I guess I would need to dig in the code of Create Independent Tag node

About the rooms - yes, they are that many.

image

It’s a residential project with lots of small rooms and we even have much bigger ones… That’s why we need that scrypt :slight_smile: I will try to replicate the issue in a small sample file

1 Like

Allright…big project :wink: no matter you work in shared coordinates or not make sure all models share origin (just give an easier life :wink: and you had aqured the coordinates…

Yeps try to run on a sample and let me know how it works :wink:

1 Like

OK, I did a quick sample with 3 levels with 2 rooms each. I selected only Level 1 and Level 2 for the test. I got only those views tagged (unlike in the project), but I still see the graph reports that 12 rooms were placed:

Once I select all room tags in the project, I really see they are 12. However, when I select all Visible in view for the two tagged views, I can only see two tags for each one, so 4 in total. I can’t really find where the other 8 are…

It seems like the node always tags all rooms, multiplied by the number of views you specified

I got the same result with your graph also. Here are the sample files I used: WeTransfer - Send Large Files & Share Photos Online - Up to 2GB Free

hello try something it works for me…i will take a look a deeper look on your file later…

this here isnt so heavy as solids…i think 3300 rooms :wink: amazing…