Originally created object disappears when i rerun the script

Dynamo is a great and powerful tool but it has two major design flaws: geometry scaling and persistent element binding. I think this will people hold back from using Dynamo, especcially because of the latter.

Element binding as a feature is not bad, but not how it is designed now. The first version of Dynamo only had session based element binding and that is ok. It would even be better if Dynamo leaves the generated geometry when you choose another alignment or surface or whatever, and only update geometry if parameters change like stationing or so. I can understand that this is really difficult to design so session based element binding is the second best.

Persistent element binding however is a really, really bad designed feature. It is an unpleasant surprise for users when somewhere in the drawing geometry will disappear when you perform a task on another alignment or surface or corridor. Users need scripts that can run on other objects in the drawing as well. How would we react if AutoCAD removes the just drawn polyline if you draw a second one? That is wat persistent element binding does. So I really hope the designers will remove this feature and keep it session based.

Meanwhile I am glad the element binding data is saved in the NOD of the drawing (and not in the script anymore) so it is easy to remove it with just one line of Lisp:

(DictRemove (namedobjdict) "DYNAMO_TRACE_DATA")

Dynamo does not use this data during the session, it only saves it after running the script, so it will not help deleting the data while Dynamo is open. It only works when Dynamo is closed and reopened. The workflow is this:

  1. Run the script and close Dynamo
  2. Delete the binding data from the drawing with the lisp call
  3. Open Dynamo and run the script on other objects

Another one, even better (@GvdB: this is your solution):

  1. Prepare the script for use in the Dynamo Player
  2. Run the script from the Player
  3. Delete the data with the lisp call
  4. Rerun the script from the Player (it does not have to be closed)

Now you can design your script so that you can select a single object, run the script and do that process on another single object without accidentally deleting the generated geometry.

Hope it will help other people to get faith in Dynamo again :slight_smile:

8 Likes