What's New for Dynamo in Civil 3D 2022.1

That it. Dynamo saves a JSON settings file in the Program Files location and needs write access to that location. This way it is not a user setting but an application setting. I wonder why the development team made this choice. Not every user is allowed to run Civil 3D as administrator, and not everybody understands the red message, how to solve it.

Two new nodes to write and read Excel without the need of Microsoft Office:

image

Keep in mind this node does not add the xlsx extension to the filename so you have to include it.

Also it is great to set a default Run mode and Geometry Scaling in the Preferences:

image

2 Likes

A short introduction: these nodes only work when the Binding Data Storage is set to Drawing. When this is not, or when the Graph is selected as storage, you don’t have access to the binding object. Also you receive errors:

When the Binding Data Storage is set to Drawing then you need to make changes in the script AND reopen the graph in Dynamo, else the nodes will not show the correct data. When that’s done, you can read the ScriptBindings and ObjectBindings.

The ScriptBinding refers to the binding of one or more graphs to the drawing and each ScriptBinding refers to one or more ObjectBindings, which are actually the results of a geometry creation node. I created a polyline and a bunch of circles, in the image above you see one ScriptBinding with two ObjectBindings which refer to the polyline and the circles.

As said before, the nodes do not show the actual information, but only after reopening the graph. If you change the amount of circles, the ObjectsByBinding only update after closing and opening the graph again, else it will show the previous objects:

image

If you freeze or delete nodes that creates geometry then the ObjectBindings still show the previous binding data. When you also delete the previously generated geometry from the drawing it returns an empty list item.

You can read the ScriptBinding by object, probably to see if the object is included in a ScriptBinding. It returns the Document ScriptBinding for each object. Don’t use this list because it duplicates and squares the lists of objects and reduces the speed of Dynamo dramatically:

It is better to work with the Document ScriptBindings node.

You can delete the generated objects and the binding. I am not sure why one would delete the objects. Delete the binding is doing something magical because all ObjectBinding lists are empty, but the geometry still act like there is a binding. Deleting objects only work when you add the node to the graph, after reopening the node does nothing.

After a full day of testing I really don’t know what to do with these nodes. Out of the box they don’t work because the Binding Data Storage is not set to Drawing and these nodes only work when that is set. Further the nodes only update when the graph is closed and reopened (I can understand the process but it is not how nodes in Dynamo should work). Maybe somebody else can show a workflow where these nodes are valuable but I really can’t imagine such.

3 Likes

Thanks for the thorough summary, Anton!

I agree that it isn’t ideal, but at least it’s a first step. There is more flexibility now than there used to be. Even if you do have administrator access, you have to close everything down and reopen for a setting change to take effect, which is little cumbersome. But it was flagged as a known issue by the development team, so that’s a good sign that the process will be refined.

If you’ve created a graph where the binding setting was set to “No Binding Data Retained” from the start, then these nodes aren’t applicable (as they shouldn’t be). But what about the scenario where you’ve created a graph with binding data retained in the drawing, but you decide that the function of the graph needs to change (maybe it is only to be used in Dynamo Player and not in automatic run mode). Then you need a way to get rid of the binding data, and it seems like these nodes would be the only way to do that.

1 Like

Perhaps an assumption was made that most of the people that would care about controlling trace data are BIM/CAD managers or other power users, in which case they probably do have administrator access.

1 Like

Thank you all for the great feedback in this thread, we have let the dev team know about it.

3 Likes

That might be the assumption but on the other hand, simple users who do not have a clue why objects disappear must be able to set this setting easily, not the hard way.

At least it is a Json file so a CAD Manager can roll this out :slight_smile:

Ah, I have another thing for the dev team :wink:

Since 2022.1 you can refer in a Code Block to ‘Document.ModelSpace’, ‘Document.PaperSpace’ and ‘Document.AcDocument’ but all these returns null. I think someone accidentally made these visible or forgot to put functionality in it. It is only possible to point to ‘Document.Current.ModelSpace’ and so on, even while these are not auto-completed.

FYI @StarLee

For Binding Data Storage settings, all the Dynamo and Dynamo Player behaviors are save with previous version if no setting is changed.

For Store in Drawing for Dynamo setting, this is the scenario:
Binding data is saved to .dyn by default.
When we run a script on drawing1, the binding data saved to .dyn is the relationship between node and object on the drawing1.
When we run the same script on drawing2, the binding data in .dyn is reset to the relationship between node and object on the drawing2.
It means when we run the same script on drawing1 back again, the relationship between node and object on the drawing1 is gone. New objects will be created, not update the original objects. It might be an issue.
If Store in Drawing for Dynamo setting is on, we will use the binding data saved in drawing when run script in Dynamo. For the above user case, the issue is solved.

1 Like

Translated by mods. Original post below the line.


I have a query, I have installed civil 3d 2022 and update 2022.1, but the Dynamo has not been installed. What could I do.


Original post below


Tengo una consulta, he instalado civil 3d 2022 y la actualización 2022.1, pero no se ha instalado el Dynamo. Que podría hacer.

The forum language is English. This is a requirement to make search work. Please translate all future posts accordingly. Thanks!

I have this same issue. I did a fresh install of Civil 3D with 2022.1 and dynamo is not appearing on the manage tab despite having the proper license permissions. Is anyone else having this issue.

I had the same issue, but with the 2022 install (not 2022.1). Installing 2022.1 actually fixed it! Anyway, you can get around it by doing NETLOAD for the AeccDynamo.dll file in C:\Program Files\Autodesk\AutoCAD 2022\C3D.

3 Likes

Unless it is disappeared. After 2021.1 installation I didn’t have Dynamo available anymore in Civil 3D 2021. If I search the Program Files folders I can only find this dll in 2020 and 2022 locations.

Thank you. You are a life saver.

1 Like

Wow bindings are bizarre. Utterly useless. It’s as if they haven’t anticipated at all that people make scripts for their teams to use, and that every time you tell your team “hey change this setting so that my script will work”, or “hey you have to remember to run as admin”, or “hey IT let the team run this one software as admin”, many won’t, efficiencies are lost, and your efforts are wasted - the exact opposite of what Dynamo should be.

I just want a node that will let me ‘turn off’ object binding, so that in relevant scripts a user who knows nothing about Dynamo except how to use Dynamo Player can run a script, and then run it again selecting a different target object, without undo-ing what the first run did.

1 Like

I definitely hear you!

If you aren’t aware yet, the binding settings can be changed in 2023 without admin rights. This isn’t a solution if your team is on 2022 for awhile, but good to know I guess. More here:

Thanks, that’s good to know, I do expect we’ll be going to 2023 at some point. When my team isn’t too busy I get to focus on Dynamo, so whenever I get back to it I get to learn about all the advances to Dynamo while I was busy on other things :slight_smile:

And hey, I discovered your Camber package this week, after struggling and failing to get some python code to work for setting ACI colours on layers. Your work is making mine a lot easier.

1 Like

Good to hear! :muscle: