Questions about object binding

I’m working on creating a dynamo graph with the purpose of ‘automatically’ filling in station and elevation values from a calc file (xlsx) and applying them to a profile in Civil 3D. I’m still new to dynamo so I apologize for asking what I suspect might be an ‘easy’ question for a lot of you folks. The deal is the graph works but with one minor little hitch. The first time I run it, it creates a new profile and appends the name with (1) after it. After that, the object binding is created and running the graph again will merely update the newly created profile.

So, the question is, can I somehow force the object binding if the object already exists in the cad file? I thought that by selecting the profile and passing that to the name it would understand I don’t want a new one but it appears I need something else. I read through the object binding information, but I didn’t see anything for this particular situation. Hopefully, I didn’t miss it…

Hi.
Yes, object binding needs a special chapter all by it self. @mzjensen explains it pretty good in this post.

In Civil 3D 2023 you can remove the binding under ”Dynamo” menu or select how binding should be stored.
The dark side is that this setting is not tied to the graph, it will be tied to Dynamo and needs to be changed if you want to run another graph with another setting

I actually set it to not keep binding but it might be incorrect in your situation

Yes but what if I want to create a binding for an object that exists in the cad file prior to the first usage of dynamo?

It seems like I need a node or something to ‘create’ a new binding to an existing cad entity. In this case, “Proposed Stream Profile.”

I can see how it wouldn’t matter if I had been using the workflow when the project starts, but what if I wanted to started trying to work this way when a project is already underway? It also seems like this would be a common need which is why I was thinking there is something fundamental I don’t understand here…

Btw, is this 2021 or 2023? I reviewed your graph after my post and realized that you might not use 2023 and I think this function was introduced in 2023 version.
Anyway, if possible, set it to be saved in drawing when run Dynamo and Dynamo Player.

2022

Opened it in 2023 real quick and I see a bunch of popups about out of date packages now. Guess I’m gonna get sidetracked into to reading up on versions and compatibility first… lol

Im away from my desk but there is a code floating around from @jacob.small to repress element binding but it is to he used with great caution.

Using this, you can in evalaute the numbers from xlxs to understand if it is new or just requiring some updates values I guess…

I tried in 2023 with the save in drawing option checked. It still creates a new profile on the initial run.

That isn’t binding. That is updating an existing object by selection, which is doable but via different means for each object type.

Basically what you want is likely doable, but in a different way than you are currently approaching it.

This is for Dynamo for Revit. Trace is 100% different in the context of Civil 3D, so much so that I won’t bother checking the technical aspects like I did for Revit - can’t fit it into an AU session anyway. For what it is worth, the Dynamo for Civil 3D team has documented what is needed to utilize the tool anyway. :slight_smile:

1 Like

That makes sense. Thanks for the confirmation.