I’ve created a simple Dynamo script that creates curved parametric trusses between two columns. The idea is that the user can select columns at various areas to create the trusses over consecutive columns or entirely different sections.
The problem is that every time I run the Dynamo script (from player or platform), the output from the previous run is replaced and I can only ever create one truss using the one script.
Is there a way to lock the outputs of each run into Revit so I can create multiple outputs without having to pre-define the number of trusses or create multiple scripts?
So once I’ve made the truss below, the next time I run the script (pick different columns) the truss will disappear and be replaced by the new truss, even when it is at a different location.
There were some discussion of it and some packages already tackled this.
Also, you could try this: wrap the creation segment of your graph into a python node, call ToDSType(True) deliberately to your elements, giving the ownership to Revit instead of Dynamo. If I remember it correctly, ToDSType() will do the trick.
Thanks @jshial would you happen to have some resources/examples for the usage of ToDSType?
I’ve been trying to get into transactions and API programming, but finding it difficult to find easy-to-understand resources. The Bakery package requires me to uninstall the Rhythm package due to dependencies, which I can’t do since I have other scripts reliant on Rhythm nodes.
There is also my AU class and associated documentation linked in there, and a if you’re just curious you can get a quick highlight starting around the 12:50 mark of the video here: Element Binding in Revit
Solved! Thanks for your help @jshial and I did remove the binding from the .txt file @jacob.small
Turns out “level.Id” does not goes into the NewFamilyInstance method and I suppose the UnwrapElement already took care of this. I was blindly following guide for it so there ya go.
I’ll leave the script below for any future reference!