Disconnecting "Baked" Objects from Dynamo in Civil 3D

Is it possible to disconnect objects after “baking” into Civil 3D. I have tried moving them, changing their layer and even closing and opening the Dynamo Script between running the code and the ObjectByGeometry etc still finds the shapes/ curves etc and deletes them and matches what is not previewed in the Dynamo viewport.

I did just get it to leave one set when i moved and change the layer on 2 sets of solid but it seemed like it picked which ones to deleted/replace.

I can understand the thinking behind making it that when the code is run it deletes what’s in the drawing and replaces it so you don’t end up with a pile of duplicates but not that after the object is moved and the layer changed it still thinks it should be replaced. I guess the object ID has not changed.

Ok so it seems making a copy when you move it with the gumball or the copy command does not require you to change the layer and it does not find new new copy as it has a new ID, Even if it is copied in place And just matches what’s in Dynamo again. Are there any other ways to do this people are using?

This sounds like element binding at play. Can you post a sample dyn for me to confirm? Make sure that the issue presents itself, the save the dyn, then post it. :slight_smile:

Sorry for the delay was out of the office, please find attached sample code. Element Binding makes sense and breaking this when you copy is good. Even if you copy in-place
Keeping-Geometry Question.dyn (46.3 KB)

Definitely a binding issue.

Not sure if the Civil 3D version of Dynamo Player is robust enough for you to use that and avoid the problem (I haven’t actually opened your graph as I am mobile at the moment).

You could also look at ‘baking’ the geometry into the D4C3D nodes in a Python node with the ToDSType turned on. This will require a good bit of Python on your end; will make updates much harder over time though as you won’t be able to save the IDs of created content into the graph; and you will run the risk of having duplicated objects in your file.

Alternatively, after you remove the bindings from the file, you could close the graph between runs and not save the dyn at that time. The drawback here is that you will need to reopen the graph on each run.

Likely the best solution is to not change a thing and keep the bindings in the file, but build the larger workflow so it makes ALL THE THINGS in one run. Not sure that’s an option here though.

Yeah i think keeping the current binding so it updates and removes duplicates so you don’t have to keep deleting the old version and using Co (Copy) Command to move a copy of the output somewhere else to break the geometry binding. So you can have versions of the design saved even if you run the code again and change something.

1 Like

I saw in the beta release notes that the binding information is saved in the drawing and not in the script, what makes it much more difficult to remove the binding.

I don’t get involved with C3D beta stuff, but you are certainly right. Decoupling that data is something which I think development will have to clearly expose and document. Be sure to ask how that is done/managed in the beta forum.

For now though I believe that all bindings are saved into the DYN directly, and can be stripped out as per the similar instructions for Revit bindings.