In the Sample Line group, the section views were obtained 50 m wide from the alignment to the left and right.
The coordinates were obtained as Section Geometry, and when they were Curved, the coordinates were obtained.
Since the section view itself was acquired 50m wide to the left and right, I assumed that the x-coordinate would be -50 to 50, but for some reason I could not get all the points.
How can I get the x-coordinates from -50 to 50?
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