Quantcast
Channel: Forums - Python
Viewing all articles
Browse latest Browse all 2485

Extracting Layer from AutoCAD file and converting into featureclass

$
0
0
Good day,

Is there a way to extract one layer from AutoCAD drawing, and convert it into a featureclass in a GeoDatabase?

I'm trying to following code in the Python window inside ArcGIS, but it only produces everything in the drawing in the new featureclass.

Code:

wClause = '"Layer" = \'line2\''
cur = arcpy.SearchCursor("alignment.dwg Polyline", wClause)
arcpy.CADToGeodatabase_conversion("alignment.dwg",r'F:\Projects\New File Geodatabase.gdb' , "Line2","1500")

Regards,
Ahmed

Viewing all articles
Browse latest Browse all 2485

Trending Articles