I need to extract data from different layers in .dwg/.dxf files in Python. Layers information includes metadata as well as different block information used in the drawing(color, length, width, etc.). Is there any library in Python that can do all these?
I don't have AutoCAD software. Please share the details if anyone has any Idea about this.
Thank you in advance for the help!
CodePudding user response:
Check out https://pypi.org/project/ezdxf/ . It is what you are looking for, insn't it?
ezdxf
Abstract: A Python package for creating and modifying DXF drawings, regardless of the DXF version. You can open/save any DXF file without losing content (except comments). Unknown tags in the DXF file are ignored but retained for saving. With this behavior it is possible to also open DXF drawings that contain data from third-party applications.