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])