Hi
The below script doesn’t export the surfaces solids, Do you know what is missing ? it returns empty lists
ExtractSurfacesSolids.dyn (12.4 KB)
Regards
Hi
The below script doesn’t export the surfaces solids, Do you know what is missing ? it returns empty lists
ExtractSurfacesSolids.dyn (12.4 KB)
Regards
Hi
What I want to achieve is extracting as many surfaces as available within the model to separated files ( file for each surface solids) … is that possible ?
Oh really
I have not tried it before
May this link help you
or using civil api
https://help.autodesk.com/view/CIV3D/2022/ENU/?guid=a928536c-2ef0-ca28-1903-b00359295053
if this task shall be done by a python coding, what does this node do then ?
I think I haven’t tried it
You need this link after that with some changes
To export to another drawing
hi
try
import clr
import System
clr.AddReference('AcMgd')
clr.AddReference('AcDbMgd')
clr.AddReference('AeccDbMgd')
from Autodesk.AutoCAD.ApplicationServices import *
from Autodesk.AutoCAD.DatabaseServices import *
from Autodesk.Civil.ApplicationServices import *
from Autodesk.Civil.DatabaseServices import *
from Autodesk.Civil.DatabaseServices.Styles import *
adoc = Application.DocumentManager.MdiActiveDocument
civdoc = CivilApplication.ActiveDocument
SS = IN[0]
LL = IN[1]
LLYY = IN[2]
PATHTH = IN[3]
def create_catchment_label(SS,LL,LLYY,PATHTH):
global adoc
global civdoc
II = -1
output = []
if not isinstance(SS, list):
SS = [SS]
if not isinstance(PATHTH, list):
PATHTH = [PATHTH]
with adoc.LockDocument():
with adoc.Database as db:
with db.TransactionManager.StartTransaction() as t:
for c in SS:
SurfaceId = c.InternalObjectId
II +=1
PATHTHi = PATHTH[II]
obj = t.GetObject(SurfaceId, OpenMode.ForRead)
if isinstance(obj, Surface):
SolidQ = obj.CreateSolidsAtDepthToFile(LL,LLYY,1,PATHTHi )
output.append([SolidQ,PATHTHi])
t.Commit()
return output
OUT =create_catchment_label(IN[0],IN[1],IN[2],IN[3])
It worked perfectly with simple surfaces but it returns this warning for the huge ones:
(Warning: IronPythonEvaluator.EvaluateIronPythonScript operation failed.
Traceback (most recent call last):
File “”, line 72, in
File “”, line 65, in Create_Catchment_Label
SystemError: Surface has too many triangles, no more than 100000 triangles allowed)
try
using Manual

I already use Manual
Oh really
I don’t know the problem
Can you attach an example drawing?
for experimentation
I uploaded it here due to big size
it works from the civil 3d built in command but takes a bit long time
let’s investigate if there is a coding line can overcome this
I got this issue exactly and used what @hosneyalaa suggested (cropping the surface). My workflow :
Normally it is the terrain surface that is too big. Personally I used the corridor surface perimeter with a small offset as the cropping object. It worked nicely