Room 'SetNumber' API bug?

This came to my attention today and I was quite shocked. I spent some time on it, trying to identify where the problem comes from, but I can’t. You can see an example of the issue here:

Here’s the python code:

Since rooms come in the correct order as seen from the screenshot and the sequence is generated correctly, then why does the first room get the number 04, the second one - 07, etc. :frowning:

What makes it even more confusing is that once you get only one list from the main one, it actually works fine…

Using Dynamo nodes to complete the task, such as SetParameterVal… returns the same result

Any ideas what’s going on?

EDIT: Forgot to mention, it’s Revit 2021.1.4 and Dynamo 2.6

1 Like

Can you post the full graph and a sample data set? I think something is off further upstream which we aren’t seeing here.

Also try getting the room’s number in the python node instead of regenerating the value string.

Hi, Jacob and thx for coming by!

I also took the room number…

Now the result is even more shocking :smiley:

Honestly I don’t think it’s something upstream, it’s only geometric operations and sorting to get the final Rooms list. This script alone should normally work when given a list with rooms. You can actually see it even writes the correct number, but then it still reverts back to the wrong one…

Can you pop a “select model elements” node in front of this python and post the .DYN?

I’m also noticing you don’t have a transaction open which is likely preventing the data from being saved back to the file.

About the transaction - I tried that yesterday and it didn’t help. About your suggestion - it actually works like that…

I really dont get it, in both cases the python script gets a list with rooms… here is the short graph
Test.dyn (12.6 KB)

And also the long one:
Rooms - Auto Renumber by Area - 21068.dyn (281.3 KB)

For that one to be used, I will need some time to replicate the issue in sample files

I just opened the same file from last week to clean and upload as sample and now it works…

Weird thing… seems like the case is closed. If I manage to reproduce the issue somehow, will let you know :slight_smile:

2 Likes

Good to hear as I was unable to cause the issue in the first place… :slight_smile:

1 Like

yeap, sorry to bother