Revit Crash - Set Parameter Value by Name

Hello together,

i wrote a dynamo script in order to create door-numbers out of room parameters but Revit seems to be overwhelmed and crashes every time i run it. I understand the file is quite heavy - we are talking about 884 doors, but i wonder if there is something i can do to avoid the crashing. Does someone have any idea?

Thanks a lot!

Hi,

it’s always a good idea to write a graph and run tests in a simplified controlled project.
Start a new project from scratch, create 5-6 doors and see what happens.

If it happens anyway, then probably something is wrong in the graph. In this case maybe drop the simplified Revit and the .dyn file here.

If everything works smoothly, try again with 50 doors, then 500 and let us know :wink:

1 Like

hi bial
please check the file there is problem in file all the parameter values are not editable manually itself.I just created a new file and then i opened the Current file which you shared it is working and i changed the list to x[0] also it works try it…

!

1 Like

are you feeding a door element to your element.getparametervaluebyname node?
check out if your door.room node output a door, or something else.

The Input is a string…

element.getparametervaluebyname node requires an element and a string

I has been fixed already

The graph is fine, I’m pretty sure you are using the Automatic mode. Try with Manual and everything will be fine.

manual%20mode

When you have a node All Elements of…, the node get refreshed every time something is modified in the model.
That means an infinite loop is created (get elements > set parameter > get elements > set parameter …) and that is why the software crashes (it is basically a self-protection from looping)

3 Likes

Thanks guys, it is working just fine now!

I just have one more question: i tried to filter the list with a boolean mask because in the original project 220 doors open to the outside / no room (so that the result ends up being T…). This reduces the list from 884 to 664 items. What i want is revit to ignore this cases, so that i can do it manually. Once i run the graph, the parameters that where generatet in Dynamo go to the wrong doors in Revit though… :thinking: what am i doing wrong here?

your lists do not match anymore after the filter by boolean.

1 Like

You need to filter out both values (as you have already done) and elements, otherwise you have 884 elements and 664 values.

1 Like

I understand the issue, but what’s the best way to do it? I tried to replace “T…” with " " using string replace and it worked well the first time, but then say i fill the empty names manually in revit and run the graph again - it will erase them… what i want is dynamo to ignore the ones that dont have any room information, so that i am free to work manually with them without revit…

looks like i got it

1 Like

maybe go the other way around and set all values to all doors in one go all inside dynamo.
so the filter by boolean has to go
another option would be to create a wall outside all of your geometry and put a room in between called outside

or if you don’t want to see a 3D geometry at all you could use a room limit instead. We used that with success in a couple of projects in the past