Tagging rooms along a line - and apparently also not on the line

Hi there!

I have made my very first Dynamo script YAY!

but I have encountered a small problem… So first off, my script helps me naming rooms along a line/ spline (100 points), so that Dynamo names the rooms 2, 4 6 and so on… Problem is, that the script, somhow names my corridor, even though it is NOT along the line, as shown below…? can you guys tell me why it reads this room as well?
HELP!?

Dynamo%20problem|690x495

Hi Kris
Congrats on your first script, beware, it might become an addiction. (Also you actually create Graphs in Dynamo, it is only textual programming like Python that are scripts) :wink: But a lot of people seems to have trouble drawing the distinction.

Anyway sorry for the lecture, can you upload a picture of your graph with previews enabled and appropriate watch nodes for us to be able to follow the information flow? The link you made does unfortunately not work.

2 Likes

Hi there Jonathan

thank you for the feedback. Here I thought I sounded “SOOO” smart, guess not. :grinning:

Anyways, I have tried uploading a Picture of my graph below:

Because Im new I can only post one pic pr. post, so to be continued…

So where I see The problem is here, or a bit before. All of the 100 points, reads the correct room, but ALSO the corridor room. Which is not supposed to happen:

you can divide your graph as a image & upload one by one.

Lastly, here is the floorplan that I am working on, where the corridor and the rooms are shown:

Good top is to zoom in so that you can see the node-names etc, and use the camera button in the top right hand corner, this will capture the entire graph with in a decent quality :slight_smile:
(Also, what is the little piece of “line” that you have along the corridor)?

firstly, I have just updated the picture, so that all of the note names are now shown :slight_smile:

As for the magenta box, this is a firehose, that sits in the wall, and the line that goes through it, is the room boundry for the corridor.

My best bet without having a Revit file to test on is that the geometry (boundingbox) created for the corridor contains all rooms because the corridor goes trough the building as a “snake” and the boundingbox goes from outmost-point to outmost-point creating a square box incoorporating the entire “room” that is the corridor. This is also why the boundingbox is true several times.

Alternatively please upload both .rvt and .dyn file and I’ll run some tests. (if you are not yet allowed to upload files on the forum use a google drive link or dropbox link or likewise).

1 Like

Hmmm, maybe thats true, eventhough I cant really see how its possible with the room bounding box on the outside the “real rooms”. But I think i’m going to try a workaround, and see if i can filter the corridors out of the full list, so that they’re not there in the first place. Will return, when i figure something out!

Looks like the corridor is always at the first index of the lists, so a “getitematindex” with level set to 2 and looking at index 1 would be a workaround for this specific case but not as generic as one might wan’t. :slight_smile:
If you upload your .rvt and .dyn files I can give it a go? :slight_smile:

I will take a look at your suggestion too.

When it comes to sending files out, I cant, we are not allowed in our firm :wink:

Completely fair, sometimes a small sample file not belonging to firms (without any “real” data) in them can be used to identify the issues. Please let give an update if you discover a solution. :slight_smile:

Okay, here goes.
I tried doing as you said. Using the graph on a sample project in Revit with the dyn file. The same thing happens, so apparently rooms, that go across/ around other rooms, makes a “box” around these rooms, or something. Because every point had another room to it, and guess what, it is a corridor again! look below.

Tildel brugsnumre ud fra spline.dyn (24.0 KB)

So I tried my own “workaround”, where I added a a filter for the rooms, because all my corridors, is always called the same name. So I added the filter, right after every room have been found and went on from there. So now it works :smiley: :tada::tada:

Final result!

1 Like

That’s the thing about bounding boxes, they take the outmost corners and envelop them in a square box (unfortunately) glad you found a result :slight_smile: Please mark the topic as resolved (by your solution)

1 Like

Hi kris, have a look at this post if you have not already seen it :slight_smile:

That’s super :slight_smile: !