Generate next

If I have some dynamo code…if I select example element room and click run manual run code that generate floor…if I select other element room and then run code…the previous generate floor is delete and create new one

how can I leave the previous floor and create new one in second room?

Could you please post some screen captures of your code and any error messages you might be getting? Or even better, post the DYN itself. It will only help those that are willing to help to see what you have and where you might have errors.

Hi @P_Fiala!
If you open the script and run your code, close dynamo without saving, open again and rerun script, it should work. All due to dynamos element binding with Revit.

Really? its funny…if I have many room :smiley:

I think they added this functionality to Dynamo on purpose.
There are times you modify the script in order to fix some problems in your model.
The purpose of running a script is to modify your model.
When Dynamo create an object in Revit, Revit object it associate with that instance of dynamo script in memory.

one other solution is to save your Revit file for each floor and then link all the models together.

Generally it’s faster to do all the things at once, so minimizing the clicks by feeding a list into your input will save you having to open and close your graph and make things go WAY faster.

So I’d try modifying the graph to take a list of selected elements instead of a single element. All elements in active view after a hide isolate is a great way to do this. Or all elements of category, group by level, group by floor finish. Or a host of other options.

Less (clicks) is more.
:wink:

Another trick is to click Run on manual mode. When you click run again and your elements disappear, make sure Revit is active then undo the change as this will restore the first set of elements. Click Run again and you should end up with both sets of data without needing to close/reopen Dynamo or Revit.

1 Like