https://nodesautomations.com/posts/python-pyautocad/
Automate AutoCAD with Python