Python操作CAD文件
import ezdxf
# Create a new DXF document.
doc = ezdxf.new(dxfversion="R2010")
# Create new table entries (layers, linetypes, text styles, ...).
doc.layers.add("TEXTLAYER", color=2)
# DXF entities (LINE, TEXT, ...) reside in a layout (modelspace,
# paperspace layout or block definition).
msp = ...