AutoCAD Automation for Python
Project description
pyautoacad - AutoCAD Automation for Python
This library aimed to simplify writing ActiveX Automation scripts for AutoCAD with Python
Features:
Simple usage example:
from pyautocad import Autocad, APoint acad = Autocad() acad.prompt("Hello, Autocad from Python\n") print acad.doc.Name p1 = APoint(0, 0) p2 = APoint(50, 25) for i in range(5): text = acad.model.AddText('Hi %s!' % i, p1, 2.5) acad.model.AddLine(p1, p2) acad.model.AddCircle(p1, 10) p1.y += 10 dp = APoint(10, 0) for text in acad.iter_objects('Text'): print('text: %s at: %s' % (text.TextString, text.InsertionPoint)) text.InsertionPoint = APoint(text.InsertionPoint) + dp for obj in acad.iter_objects(['Circle', 'Line']): print(obj.ObjectName)
See more examples in source distribution.
Links
- Documentation at readthedocs.org
- Source code and issue tracking at GitHub.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Filename, size | File type | Python version | Upload date | Hashes |
---|---|---|---|---|
Filename, size pyautocad-0.2.0.win32.exe (209.8 kB) | File type Windows Installer | Python version any | Upload date | Hashes View |
Filename, size pyautocad-0.2.0.zip (45.6 kB) | File type Source | Python version None | Upload date | Hashes View |