Extract Solids for Multiple Corridors

Is your version of civil 3D 2023 fully patched (or at least to 2023.2)?

2 Likes

Corridor.ExportSolids .NET API was added in 2023.2 update, so you must ensure that you are applying this update or above.

1 Like

Hi @sbakzadeh
As @Ahmed.Kamal.Moussa and @jacob.small said above, make sure you are using at least C3D 2023.2.
I tested your script in 2024 and works like charm, no crash and not even a warning :star_struck:.

1 Like

Thank you so muchhhhh , I really appreciate it

Thank you so much Ahmed

1 Like

Hi @JPS,

I have updated the script. Removed the exlcodes = Arraystr and changed the line 'param.ExcludedCodes = exlcodes to param.ExcludedCodes = exludedcodesin[i]

How does that work for you? When I do that it still asks for array not list.

And also did you have any particular reason to not include the new database in the script so the objects are only created in a new file and not being in current db, thus in theory resulting in faster run?

1 Like

Hi all,
I am trying to add a couple of nodes or change the python script so that the exported solids are on the same layer as the corridors they were exported from. Could someone please confirm whether this is possible or not within the same dynamo graph?

Hi, I was wondering what is the type of output we are getting from this script ? Is it objects or geometry ?!!

1 Like

Hi,
it creates Solid objects in the C3D database.
the export variable (corridor.ExportSolids(param,db)) should return the created objectId collection.
https://help.autodesk.com/view/CIV3D/2024/ENU/?guid=28f51d61-5e43-f7dc-0492-f61de54ac85b

is it possible to refresh link?

Hi Eno, did you find any solution for this? I’m actually trying to extract solids with the same layer as the shape code assigned in the subassembly, like we do when using the manual command.


It would be really helpful!

1 Like

Hi,

Sorry I still have not solved the issue.

Hey folks,

In Civil 3D 2025.1, there is a new node called Corridor.SolidsByRange that can be used to extract corridor solids. The solids come in directly as Dynamo solids without adding them to model space, so you can choose if you want to keep them in that format or create objects using Object.ByGeometry.

Here’s an example using a single corridor, which could easily be extended to multiple corridors.

corridor_solids

6 Likes

In Civil 3D it works but with Dynamo nodes there is some issue. Do you have similar experiences with not generating 3D solids of slopes from Dynamo but from Civil 3D without problems?

Is geometry scaling set to medium?

Yes

I would suspect a situation where there are probably multiple points at one point in the section, and then the 3D solid has trouble being created.

If the slope is defined by a link rather than a shape, then it will be a Body object and not a solid in Civil 3D. Bodies are not supported in Dynamo at the moment.

It is always shape here.

Are you able to share the DWG? Feel free to DM me if needed.

1 Like