reclosedev / pyautocad

AutoCAD Automation for Python ⛺
http://pypi.python.org/pypi/pyautocad/
BSD 2-Clause "Simplified" License
506 stars 143 forks source link

How to use the AddMLine? #22

Open 1019245175 opened 6 years ago

1019245175 commented 6 years ago

I know how to use the AddLine or the AddCircle. But i don't find the answer.Could someone tell me?

FrancoTonutti commented 5 years ago
from pyautocad import Autocad
import array

acad = Autocad(create_if_not_exists=True)

points_3d = [0, 0, 0, 1, 1, 0, 2, 1, 0]
points_double = array.array("d", points_3d)
mline = acad.model.AddMLine(points_double)

mline.MLineScale = 1