This work explores the automation of AutoCAD workflow using Python scripting, with a focus on the different Python libraries available for such tasks. The article analizes four prominent Python packages—win32com, pyautocad, PyAutoGUI, and ezdxf—assessing their strengths and weaknesses in the context of AutoCAD automation. To evaluate the performance of these libraries, a Python application was developed for the simple task of prefixing layer names in an AutoCAD drawing, testing each library’s effectiveness in accomplishing this task. The findings indicate that each Python library offers distinct advantages depending on the automation requirements, with ezdxf standing out in aspects such as versatility, robustness, and documentation quality.
AutoCAD automation through Python scripting
Francesco Bianconi
2025
Abstract
This work explores the automation of AutoCAD workflow using Python scripting, with a focus on the different Python libraries available for such tasks. The article analizes four prominent Python packages—win32com, pyautocad, PyAutoGUI, and ezdxf—assessing their strengths and weaknesses in the context of AutoCAD automation. To evaluate the performance of these libraries, a Python application was developed for the simple task of prefixing layer names in an AutoCAD drawing, testing each library’s effectiveness in accomplishing this task. The findings indicate that each Python library offers distinct advantages depending on the automation requirements, with ezdxf standing out in aspects such as versatility, robustness, and documentation quality.I documenti in IRIS sono protetti da copyright e tutti i diritti sono riservati, salvo diversa indicazione.


