Placing Rooms From Linked Model - Room.ByLocation Node

Hi everyone,

Been a while since i have had the chance to write some more Dynamo. This is my second account on here as I have changed jobs since my previous postings. As accounts are based on Autodesk accounts I doubt I can recover it(?)

Anyway going off topic, I am looking to create a script that will pull (recreate) rooms from a linked model into my model. As per my title I am using the Rooms.ByLocation Node.

So far I have used the Bimorph package to get the data and as the Rooms.ByLocation requires a Level I have filtered the rooms to be by Level and the idea was that i could create the rooms one level at a time.

However, the Rooms.ByLocation Node automatically deletes the rooms each time it runs. So I can create the ground floor rooms but when i then do the first floor it deletes the ground floor rooms.

Anyone got an idea of how I could work around this or to adapt this script so that I can create all the rooms on all the levels at the same time?

EDITTED : For some reason, when this script is run within the Dynamo Player it does not delete the rooms… :upside_down_face:

Thanks,

This is why: Element Binding in Revit

1 Like

How interesting, I hadn’t notice that the files sizes changed before. I made a copy of the script and renamed it and then I was able to have both the Ground and first floor rooms retained within Revit. When i closed the second and reloaded the first script it deleted the rooms again but only the rooms on the level I had used that script to produce previously. So I guess the bindings are holding onto the element IDs.

This would certain explain why some of my past scripts would not work once they had been run. I had to close the file and reopen Dynamo to get the functionality back.

So how come this does not affect the Dynamo Player? Does the player not store any binding data then?

For the binding to be added into the file you have to ‘save’ the graph.

It may not be the case on modern builds, but back when I dig deep unit this just running in Dynamo and making no changes will surface a message ‘would you like to save this graph’ when you’re done. The only things which changes are the bindings, which are what is saved.

With Dynamo Player there is no capability to ‘save’ the DYN, as such you have no bindings applied; each run is effectively ‘open > run > close’, which you could do in Dynamo, but the added time to render the nodes and wires, perhaps geometry and data preview rendering too, and the ‘do you want to save’ question makes that a very painful process.