Duplicated Revit Geometry when re-running a Dynamo Script


#1

Hi guys,

I think I read something about this but I can’t find it now neither here nor on github, so I hope someone can help me:

in the past the Dynamo script used to remember the ID Numbers when creating Revit Geometry. If you saved and closed both the Revit file and the Dynamo file, then re-opened them, changed some parameters and then re-run the script, Dynamo would CHANGE the Revit Geometry.

Now, I keep getting a new geometry on top of the old one.

Is this a known issue?

 

Thanks,

Lejla


#2

This probably depends on what type of geometry it is and its creation method within the API. As an example creating grid lines in dynamo will create duplicate grid lines everytime the script is re-run.


#3

Hi have personally experienced an identical issue that I haven’t been able to solve.

@ Lejla, if you find any solution or ways around it, let me know ! For now, I have a “On/Off” (Number Slider 0-1) button linked to a if statement that cancels the baking of Dynamo elements in Revit. That way, every time I close or save my Revit file, I press Off which leaves the Revit model “intact”. When I re-open Dynamo, I start by switching On the baking and the elements are re-created with-out duplicates. Another alternative is the just manipulate elements created in Revit using transformations, of “set parameters” type of nodes.

@ Mark, on my current project I am working with structural elements created using lines in Dynamo and the “StructuralFraming” nodes.

Thomas


#4

Thanks for your replies, guys - I’m placing adaptive components in Revit using Dynamo.

@Thomas: manipulating the existing elements is a good approach, however it basically requires a separate script and I’d like it better if I could just re-run my script the way it is.

I’m not sure how you are achieving the On/Off function - could you maybe post a screenshot of that portion of the script? Do you have a custom node for this?

Thanks, Lejla


#5

Hi Lejla,

I’m using a “Bottleneck” approach with an if statement. See example in the pictures with creating a set of columns (baking them or not in Revit).

Thomas
ONOFF2

ONOFF1


#6

Thanks Thomas, now I get it! However using your concept you must re-run Dynamo every time and not only when you have changes. I’m creating a script which is generating a custom facade, however I would like to be able to adapt it later lthrough the Dynamo if needed. However I guess I’ll stick to your first workaround (creating a second script for adapting the families once they were created).

Still hope someone can tell us why this behavior suddently changed (as I’m quite sure it used to work…)!

Thanks, Lejla


#7

Sure ! I know it’s not ideal. If you get any answer or have any ideas how to solve the issue, let me know, i’m highly interested.

Good luck with your project.

Thomas


#8

Hi, i have the other problem, i want dynamo to forget elements, without restarting script. i have a clockwork component that places detail items in view, but with new view i want new elements and keed old ones (right now it removes elements form forst view). thanks