Skip to main content

AutoCAD Automation for Python

Project description

pyautoacad - AutoCAD Automation for Python

Requires:

Optional:

Feautures:

  • Simplifies work with coordinates (3D points)

  • Efficient objects iteration (with casting to correct type)

  • Excel/csv import and export (optional)

Usage:

from pyautocad import Autocad
from pyautocad import APoint

acad = Autocad()
acad.prompt("Hello, Autocad from Python\n")
print acad.doc.Name

p1 = APoint(0, 0)
for i in range(5):
    acad.model.AddMText(p1, 10, u'Hi!')
    p1.y += 10
p2 = APoint(0, 0)
acad.model.AddLine(p2, p2 + APoint(0, 100))

dp = APoint(10, 0)
for mtext in acad.iter_objects('MText'):
    print mtext.TextString, mtext.InsertionPoint
    mtext.InsertionPoint = APoint(mtext.InsertionPoint) + dp
    # or
    # p = APoint(mtext.InsertionPoint)
    # p.x += 10
    # mtext.InsertionPoint = p

See more examples in source distribution.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyautocad-0.1.0.zip (22.8 kB view details)

Uploaded Source

Built Distribution

pyautocad-0.1.0.win32.exe (203.9 kB view details)

Uploaded Source

File details

Details for the file pyautocad-0.1.0.zip.

File metadata

  • Download URL: pyautocad-0.1.0.zip
  • Upload date:
  • Size: 22.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pyautocad-0.1.0.zip
Algorithm Hash digest
SHA256 a03ea08fc6ef5b15140122071c32e2fedc98e3dc710d7c151aa9d307939e6553
MD5 74696476dbbcc346580a9b6eaf6765f8
BLAKE2b-256 67dd369de41411c15517e70747d9bcac879b2941cac6cb0d5faccb179422f89a

See more details on using hashes here.

File details

Details for the file pyautocad-0.1.0.win32.exe.

File metadata

File hashes

Hashes for pyautocad-0.1.0.win32.exe
Algorithm Hash digest
SHA256 b642c4d2e7225f6bb891a6feda747d2892fa3ad94fb7848c856059775c61c3ce
MD5 b087afb7c28f2bba19fa1b285d541280
BLAKE2b-256 57409c2d123c147af174e1ef4e0d0a849b45740ac1040671a58dc87efaaa4a19

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page