Civil3D export solid to json

Hello all,

In civil 3D I want to export a solid 3D to json in order after to transform it to a revit family.
I found a script for the first workflow but there are some nodes that cannot be found. Do you have any idea ?

Thank you in advance!

These nodes may come from a package, I’m not sure you can maybe show the errors or what the “Workspace References” extension is showing as information (depending on your C3D and Dynamo version you may not have access to the Workspace References). Anyway assuming you have dynamo geometry for the solids, to write to Json use the following :

Also if you don’t mind asking, have you tried Civil Connection ? It is what I’ve used to create revit families as you can then get information from the corridor. This will depend on your workflow and what you are trying to achieve

thank you for your answer!
I dont have access to the workspace reference (C3D :2022 , Dynamo : 2.12).
I tried your script but I have the error in the image.
I tried to install CivilConnection 2022, but the civilpython dont seems to work…

And the error when I tap Python in civil 3D after the installation of civilpython :

Hi @mairh_tsek the image was just the nodes that you need to add at the end of your script, but you still need to plug-in the dynamo geometry that you have (solids). If you have solids on Civil 3D then you will need to get them in to the dynamo space beforehand using the selection nodes under the AutoCAD shelf in the library.

Based on the versions you are using, you should already have access to the workspace reference view extension, this will give you information about dependencies in your graph such as packages used :

Finally for civil connection, did you read the installation guide before hand ? there are also youtube videos that explain how to install it. Basically you will need to unzip and paste on the correct location both Civil Connection and Civil Python as well as unblock the dll if its blocked. I recommend going through the available documentation thoroughly. Civil Connection allows for some sweet workflows.

Hello and thank you for your time,

Yes about civil connection I checked the videos and I have the error below:

I can not understand the way to get the solids 3D from civil3D to dynamo

Just to confirm, you are using Civil Connection in Revit right? as Civil Connection its a package for Revit.

Below the quick way to get all solids as dynamo geometry :

You can also select interactively or by layer for example. Once you have the objects identified you need to bring them to the Dynamo space essentially creating proxies that then you can work with in the dynamo space (modify them, extract their properties, etc. etc.), this is what the object.geometry node does. I suggest if needed also going through the Dynamo Primer to get a better understanding of how this works

1 Like

I cannot find the Document.ModelSpace nodes. It comes with a package ?

In Dynamo 2.6 there is not the possibility to see the Workspace References ?

You cannot see it because you are using Dynamo for Revit and it is a node specific for Dynamo for Civil 3D that allows to interact with the current document.

Dynamo for Civil 3D : Interaction with DWG (C3D and CAD objects)
Dynamo for Revit : Interaction with Revit Document and can interact with open Civil 3D document if using Civil Connection package.

If you are using the JSON workflow, you will need to use first Dynamo for Civil 3D to export and then Dynamo for Revit to import. If you are using Civil Connection, everything is handled from Dynamo for Revit

1 Like