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 ?!!

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