developed a Dynamo script to automate beam modeling in Revit by selecting the lines I created. The script works as intended for generating beams; however, I observed that when I run the script multiple times with different inputs, the previously created beam elements get overridden.
My objective is to make the Dynamo script retain or “remember” the previously created elements and avoid modifying them during subsequent runs. I understand that this behavior is related to Dynamo’s element binding, and I am exploring approaches such as using Data.Remember, transaction management, or implementing a Python node to control element creation more effectively. See the below snip for 1st run
And here below is the 2nd run, the first created beams were overridden



