Renaming Rooms by Spline

hi,

my script works only in one floor, when i copy the same spline to other floors, it continues the numbering sequence from the floor below, i can’t even change the spline, it won’t work with a new one.

so when i rename my rooms from unit 201 to 225, when it goes to 3rd floor, instead of 301 to 325, it starts from 326,

please help.Renaming Rooms.dyn (15.0 KB)

It looks like the bounding box is what is causing your issues. I recommend using actual geometry instead, as you’re going to get bad results with bounding boxes in many cases due to room shapes not always being orthogonal and boxy. Look into the “Select Elements By Curve” node in the Rhythm package for an example of how this is done.

not working.1.dyn (13.6 KB)

@arshamm - I just had a look at your graph and your inputs on the Select Elements By Curve node are incorrect; compare this to yours and adjust accordingly :slight_smile:

(I didn’t test further for your initial issue with renumbering sequence among different floors but thought I’d help you get the Select Elements By Curve part on track first)

2 Likes

less errors than before but it still has the same problem with different floors. when i change it on let’s say 3rd floor, room names on the 4th floor change too. Get Rooms by Level doesn’t work for my Dynamo.

From your graph, I am not seeing how you are renumbering each floor’s rooms since your graph begins with selecting a single model element (model curve).

If you place model curves through rooms on each floor (or copy model curve on level 1 and paste aligned to selected levels) and select those as your input model curves, the output from Select Elements By Curve will give you a list grouped by level so you can get a count by level to adjust the room numbering per floor:

select rooms by curve and level

Let me know if this helps!

Can you put a watch node or pin the previews on the Select Elements By Curve and Element.GetParameterValueByName nodes? Also, note in the graph I pasted above, I am not using “Select Model Element” with a single curve, but “Select Model Elements” and selecting a curve placed through rooms on each level.

2nd floor to 7th floor,

Which version of #rhythm are you using? 2017.9.17 This appears to work fine with lacing to longest.


Are you sure the curves at each level intersect the rooms?
Are your room limits set to what you expect them to be?
image

I’m using 2017.11.6 version, mine just doesn’t have RunMe, which i guess wouldn’t make a difference that much. yes they do intersect with the rooms, and yes, the room limits are set correctly.

@arshamm I just realized that I was demonstrating the same as @Ewan_Opie with the older version of Rhythm. I just updated my version of Rhythm and I see that this version of the Select Elements by Curve node is collecting the elements of category by the Active View so it will no longer work the same way for rooms on multiple levels… I’m so sorry for the confusion!

I’ll try and reconcile the differences to get this working for you. Your first graph you uploaded - did that work to collect your rooms, but it incorrectly numbered them in sequence? Because if so, then replacing the segment of your graph where you were generating the names with the method I showed with List.Count and the 1…n part of the Code Block should fix the sequences per level. Again, sorry for the mix up with the Rhythm versions!

1 Like

Renaming by SPLine.dyn (8.4 KB)

this works perfectly fine, but when i wanna change the floors above (one floor at a time) the level below changes too! i’m using annotation line, not model line, i have 374 units, so i don’t wanna rename them one by one, although it would have been done by now lol, i honestly appreciate your time and effort Amy, thanks a lot.

learning it and making it work would be awesome for the other new projects.

1 Like

Yes I agree - its actually good I realized that the Rhythm node has changed because I need to update my graph for this too :slight_smile: I tried out the graph you uploaded above and implemented the number sequencing I had incorporated where it creates a 100 number out of the level and adds on the count sequence from number of units. You might have to adjust the numbering method to correspond better with your project standards if necessary but this works ! Renaming by SPLine-Sequential by Floor.dyn (10.6 KB)

1 Like

Check out this tutorial too: https://parametricmonkey.com/2015/05/02/renumbering-rooms/

4 Likes