Civil 3d Toolkit in C#

Greeting all,
I would like to know if I can use civil 3d toolkit commands in C#, can i add the reference of the dll and use it in .Net framework?

1 Like

Yes, although I probably would not recommend it if you are looking to create a ZT package. By doing this, a dependency would be created to the Civil 3D Toolkit such that your package would not work unless the end user has the Civil 3D Toolkit installed. This could also create issues related to assembly versioning (e.g. if you create nodes that rely on a certain version of the Toolkit, but then a user doesn’t have that version installed).

@Paolo_Emilio_Serra1 might think differently, but those are my thoughts. From my perspective, I’d say that most Dynamo packages aren’t really designed to be relied upon as foundational libraries. For example, if you were to do something similar with my package (Camber), I think it would be better to fork the code and then do what you want with it instead of creating a dependency on the DLLs.

1 Like

cant I just include the dll within my plugin files, the code will just automatically depend on this dll.

Technically you can just as much referencing them inside a Python Script node, there is no difference. In addition to what @mzjensen said, be mindful that the names of the nodes, their signature etc. might change with no warnings and you would have to update your code as well.

There was an internal discussion to distribute the Toolkit by default with Dynamo for Civil 3D but to do that I need to create all the necessary tests, however, this does not protect from different versions of the assemblies.

3 Likes