JSON Multiple Solids

Hi all

I’m trying to extract a few solids into JSON then recreate it in Revit as Family
When I select 1 single solid, and create it in Revit, all is well
but it doesn’t work when there are more than 1 solids.

C3D Export to JSON:

JSON Export to Revit:

Tunnel with Void.txt (116.3 KB)
Remove the “.txt” in the file name to let it go back to JSON file

I’ve tried refering to the following post, it works for 1 solid, but not multiple solids.

Thanks everyone!!!

I would suggest you just have a little re-think as i would do the following:

  • Create a family in revit that is parametrically setup to fulfil what the items you need to generate in revit.
  • You then extract the relevant data from civil 3d and structure it in json
  • then you do a read script from json to place the families and adjust the types accordingly

Doing the above will help you and also mean the items created in revit are easier to manage, if you use the directshape method it can be a pain in some instances.

Have a read of a post i did a while ago plus watch the video - JsonData Package - #31 by Brendan_Cassidy

What is the warning on this node?

Geometry.FromSolidDef operation failed.
Failed to create geometry from solid def
**JSON: POLYCURVE_BRANCHED – **
Branched polycurves are not supported

Side note:
There was 3 separate Solids in the native Civil3D file
When I “union” the 3 solid, then it can be exported into Revit fine
Even if the first and last solid was “Union”-ed and not including the middle solid
The Solid exported into Revit was still fine.

Going to use the Mass.BySolid instead of DirectShape.
I need them to be as Revit Family to be able to place rebar down the path

I previously thought of creating a Revit Family and get the data (Points) from Civil3D to be placed.

But since the Solid created in Civil3D already has the exact geometry to what I want to create as Revit Family, I didn’t go through with the former route.

I’m thinking that the problem with my current method is the “Key”
I’m not good with this + the “level”

Can’t continue from there

Check your geometry scaling - are both set to medium?

Yes. Both the C3D Dynamo and Revit Dynamo are both set to Medium for Geometry Scaling.

Did you manage to load the JSON file uploaded? Seems JSON file can’t be uploaded.

Edit:
@jacob.small
Can we use Data.Remember across Civil3D and Revit Dynamo?
Was thinking if it’s possible to get the 3 solid geometry from revit, pass them through Data.Remember, then directly use the Geometry in Revit.

Yes, you can open a graph in Dynamo for Civil 3D, serialize data into a Data.Remember node, save the graph, and then run that in Dynamo for Revit and the contents of the remember node should be there without issue.

1 Like

Do you have a sample DWG which reproduces the error (instead of the provided JSON)?

Dynamo Bridge C3D Test.dwg (1.2 MB)

THis is the subassembly. Rename the .txt to .pkt
CentreVoid - Copy.txt (4.7 KB)

I can find Data.Remember in Revit Dynamo (GenerativeDesign Package), but what’s it called in Civil3D Dynamo?
I tried placing the Data Remember in the same .dyn, but if opened in C3D Dynamo, it wont download the package.

1 Like

It may be that you need to update to a newer version of C3D to get the Data.Remember - which build are you in?

Revit 2024
Civil3D 2024

Can you maybe create a random .dyn file and include the Data.Remember node in it?
So that I can install it. (Civil3d Dynamo)

There isn’t a package for Data.Remember - you have to manually add the path to the one which your Revit instance uses. Go into Revit and check your package paths, find the one which has Generative Design in it, and then add that to your list of packages in Civil 3d. Do not copy the package to a new location (license violation). Usually adding the path gets the Remember node exposed in that build, though if you have conflicts with other customizations you may be in a blocked state.

Since you’re in 2024 you also have some breaking changes in the JSON serialization to deal with, which may explain the issue you are running into.