I am trying to modify floor slap shapes by replicating Gavin’s workflow (https://www.youtube.com/watch?v=jo-fLZUnH6A). The Ray Bounce On Link Category node successfully finds the points, I have tried looking for irrational Z values in the list but there are none present. I am suspecting the Floor.AddPoint node to be failing, because once I run the script, the result is a jagged weirdness, see attached screenshot. I have tried the Element.SlabShapeByPoints node too, which doesnt work at all and gives me a list of false entries in a Success List. The script works on some floors relatively small in area, however, the larger ones are failing. Its fair to say that both the underlying toposolid and the floors are very complex, which is the reason why the AddPoint node fails, I think. If you have any ideas how to solve this, I would be really grateful. Thank you in advance.
Use the Transaction.End after Floor.ByOutlineTypeAndLevel. This ensures the floor is ‘committed’ and therefore becomes something that can be cleanly edited.
Then use the Transaction.Start to initiate a new transaction immediately after ending it to ensure you can cleanly write to the Revit file again.
Then finally use a method to add points. I recommend utilizing out of the box nodes first, then zero touch nodes, finally Python nodes in selecting which of the options to use.
In some cases the Python can be made to work as it handles the transactions internally; but usually that’s dumb luck as the owning application (Dynamo) already has a transaction open which may not commit (getting an error), may partially commit (getting you incorrect results) or may commit cleanly (getting things that look perfect) depending on both factors well outside your control (what else your CPU is up to) and within your control (how big of a dataset you’re processing).