Creating/Changing simple house layout works but with errors

I’m having errors in my attempt to create some floor plan creation with options to change things slightly. I’ve added the following snapshots. It works fine for first run. But when I change the option for zone 1 points by connecting to different points list from the preceding code block (circled), there are errors. I can delete the created elements and then run to avoid errors but it should work just by changing options. Unable to resolve this myself. Thank you to all the community for being so friendly and helpful.




Hi @vcat ,

This could be incorrect but I think this is happening because the walls you have created in your first run are not being removed/ replaced in the second run with another input but are only moved, and since Revit has made some assumptions about the “joins” it gives you a warning/error.

  • You could extend your script a bit to actually create new Revit elements each run and delete the others; or:
  • You could create Dynamo solids/ surfaces first ,without creating anything in Revit yet, and if you are happy with that push them to dynamo using boolean filters before the creation of the Revit elements. (at least that is how I would do it)
1 Like

Hi @Daan, how do I create new Revit elements each run and delete others? I prefer this option as this seems more dooable from my pov (relatively newbie here). I was thinking may be my error is because of flow control and I was looking to try “pass through” node.
Also I found this similar question but haven’t understood the solution yet. Python - Delete Elements Created & Recreate

Thanks

Hi @vcat ,

I’ve been thinking about that approach and on a second thought do I actually not recommend creating and deleting Revit elements each run, this will probably make the script way more complicated and extensive than it has to be.

1 Like

My assumption is the same as Daan’s. I think it’s more of an issue of “modifying” existing elements. However, this is only really an issue when testing inside the graph. This wouldn’t be an issue if using Player.

If you’re really wanting to explore without committing anything to Revit I think the following options could help:

  1. Try disconnecting the zone points and letting Dynamo/Revit “fail” to create any elements before drawing new ones. This might be enough of a “reset” to get by.
  2. (Echoing Daan) If you keep things small, I think deleting before each run is fine, but you would have to run your script in Player or else you’d have the same problem in a different place.
  3. (Echoing Daan) Creating geometry for reference seems like the best option to me. Especially if you’re exploring/testing and not committing your changes to Revit. You can always include a Data.Gate node (or simple boolean/freeze) to give yourself an option to commit. In fact, this seems like a great opportunity for a Generative Design script if you’re intent on exploring.
1 Like

Thanks @Nick_Boyts. Understood the first two points. Thank you for suggesting the third, but If you could add some detail of how I can use Data.Gate with my example and go about doing generative design. I’ve lurked around generative design but haven’t found an entry point :person_shrugging:

If you’re considering GD then I’d highly recommend going through the GD Primer and getting yourself familiar before attempting anything else. It shouldn’t be too difficult in your scenario, it just comes down to how you want to define your inputs.

As for the Data.Gate node, it’s used in GD to allow the solver to generate multiple solutions without modifying Revit until a specified solution is selected and committed to the model. You can use this node without GD as a manual boolean gate to create or not create Revit elements during your run. You could also just freeze whatever node you use to generate Revit elements and only thaw the node for when you want them created.

1 Like