Get Section Geometry

HI
I don’t understand Required
try

import clr
import System

clr.AddReference('AcMgd')
clr.AddReference('AcDbMgd')
clr.AddReference('AeccDbMgd')

from Autodesk.AutoCAD.ApplicationServices import *
from Autodesk.AutoCAD.DatabaseServices import *

import Autodesk
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]




def label(SS):

	global adoc
	global civdoc
	
	II = -1
	
	output = []
	
	if not isinstance(SS, list):
		SS = [SS]


	with adoc.LockDocument():
	    with adoc.Database as db:
	        with db.TransactionManager.StartTransaction() as t:
				for c in SS:
					output.append(c.Location.Y  )

						  
				t.Commit()
	return output

OUT =label(IN[0])
import clr
import System

clr.AddReference('AcMgd')
clr.AddReference('AcDbMgd')
clr.AddReference('AeccDbMgd')

from Autodesk.AutoCAD.ApplicationServices import *
from Autodesk.AutoCAD.DatabaseServices import *

import Autodesk
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]




def label(SS):

	global adoc
	global civdoc
	
	II = -1
	
	output = []
	
	if not isinstance(SS, list):
		SS = [SS]


	with adoc.LockDocument():
	    with adoc.Database as db:
	        with db.TransactionManager.StartTransaction() as t:
				for c in SS:
					output.append(c.Location.X  )

						  
				t.Commit()
	return output

OUT =label(IN[0])

1 Like