New answers tagged cad
You can convert dwg file to feature class, then get the extent of the polygon, using the code below: arcpy.CADToGeodatabase_conversion(path_dwg, output_gdb, "fc" , 200) extent = arcpy.da.SearchCursor( "fc" , ["SHAPE@" ] , "\"Layer\" = 'PROP-BNDY'").next().extent
As you have suggested you will have to convert the CAD polygon feature to a GIS feature class or feature layer, then you may use arcpy to get the geometry extent. First, to make a temp/in-memory layer your could use Make Feature Layer function, see example code below: polyCAD = "C:\\Temp\\xyz.dwg\\Polygon" lyr = "Polygon_Layer" # Process: Make Feature ...
If you want to edit your DXF file, use a Cad program. Many software versions are free, DraftSight, AutoCAD360, doubleCad, NanoCAD, etc.
In ArcMap a DXF file is read only so you need to export it, there is no alternative. Use the CAD to Geodatabase tool.
Top 50 recent answers are included