Hi All,
I need your help,I want to get data material section (Area…), but i can’t find node.
Thanks in advance!
Hi @All I need your help!
Hi
It is better Share an example drawing
1 Like
Hi @hosneyalaa , Thank you for your interest.
test material.dwg (8.0 MB)
hi
try
https://help.autodesk.com/view/CIV3D/2022/ENU/?guid=809e0ccb-af8b-1bf0-34b9-8f4bde7aa775
import sys
import clr
clr.AddReference('AcMgd')
clr.AddReference('AcCoreMgd')
clr.AddReference('AcDbMgd')
clr.AddReference('AecBaseMgd')
clr.AddReference('AecPropDataMgd')
clr.AddReference('AeccDbMgd')
from Autodesk.AutoCAD.ApplicationServices import *
from Autodesk.AutoCAD.DatabaseServices import *
from Autodesk.AutoCAD.Geometry import *
from Autodesk.AutoCAD.Colors import *
from Autodesk.Civil.DatabaseServices import *
from Autodesk.Civil import *
from Autodesk import *
def extract_basecurve(sampleLines):
output=[]
obj=[]
if not sampleLines:
return
if not isinstance(sampleLines,list):
sampleLines = [sampleLines]
adoc = Application.DocumentManager.MdiActiveDocument
with adoc.LockDocument():
with adoc.Database as db:
with db.TransactionManager.StartTransaction() as t:
for SampleLine in sampleLines:
obj = SampleLine.InternalDBObject
objVIEW = t.GetObject(obj.Id, OpenMode.ForWrite)
#vertices = obj.Vertices
#samplepl = Polyline()
#sline = Line()
#bt = t.GetObject(db.BlockTableId, OpenMode.ForRead)
#btr = t.GetObject(bt[BlockTableRecord.ModelSpace], OpenMode.ForWrite)
output.append([obj.SourceName,obj.Station,obj.LeftOffset,obj.RightOffset,obj.MinmumElevation,obj.MaximumElevation,obj.Name ])
t.Commit()
return output
if IN[0]:
OUT = extract_basecurve(IN[0])
else:
OUT = "NO DATA"
#OUT = extract_basecurve(IN[0])
for get area reading this
1 Like