Wall created inside a python node cannot be used inside the code?

So I was trying to create a blockage wall using a supposed fire location to update my path of travels. So my code approach was to create a circular wall around the fire coordinates and then create path of travels between points after deleting the previous ones. (inside my dynamo python node)
It seems that when I created the path of travels they did not account the wall at all…that I was creating in my code
Then I tried a different approach. I tried to get the geometry of the wall that I was creating but when I called the get_Geometry(opt) function it returned null.
And when I was trying to delete those walls through my code after the completion of my task … It gave an error continuously, the DB did not recognized the element. But when I ran my code the walls were created successfully

The wall won’t actually exist until the transaction has been committed to Revit. You need to create the wall in one transaction and then interact with it in a second transaction.

1 Like

I believe the view also has to be regenerated, which usually will happen automatically but not in all cases.

I suggest looking into transaction groups, as you can roll back individual transactions or the full group thereof. I am not sure if the previous path will be retained as views and geometry is updated though, so design options or duplicate views may be required.

2 Likes

tried using different transactions but that did not work

You’re going to have to show us what you have. Otherwise we’re just guessing.

1 Like