Originally created object disappears when i rerun the script

This behavior is a result of element bindings. From @Paolo_Emilio_Serra1’s AU 2019 class:

When the Dynamo application is visible and the graph creates objects in the DWG, the trace of the Dynamo owned objects can be serialized in the Dynamo file itself. For each node that creates objects from Dynamo into the DWG, Dynamo stores their “fingerprints” in the Bindings section of the Dynamo JSON structure, so that if the inputs change, Dynamo can confidently update only the objects that are owned by the graph accordingly.

I believe that this was changed with Dynamo for Civil 3D Update 2, where the bindings are now serialized in the DWG itself (see release notes below).

https://knowledge.autodesk.com/support/civil-3d/learn-explore/caas/CloudHelp/cloudhelp/2020/ENU/Civil3D-UserGuide/files/GUID-D26CD864-19EF-40A7-9D59-66D01C505968-htm.html

All that being said, you can try running the script with Dynamo Player. I think this is a “fire-and-forget” method, meaning that new solids will be created instead of updating old ones. If you don’t have Dynamo Player yet, you can click the “Run Script” button in the Manage tab to accomplish the same thing.

Here are some more resources about element bindings:

1 Like