Author Topic: Q: Entmake a 3Dpoly  (Read 3234 times)

0 Members and 1 Guest are viewing this topic.

Fuccaro

  • Guest
Q: Entmake a 3Dpoly
« on: October 21, 2004, 03:09:44 AM »
I can’t entmake a 3dpoly in AutoLisp
Here is the code:
Code: [Select]
(entmake (list (cons 0 "POLYLINE") (cons 66 1) (cons 100 "AcDb3dPolyline")))

(entmake (list (cons 0 "VERTEX")
           (cons 100 "AcDb3dPolyline")
           (list 10 x1 y1 z1)))

(entmake (list (cons 0 "VERTEX")
           (cons 100 "AcDb3dPolyline")
           (list 10 x2 y2 z2)))
…………….

(entmake '((0 . "SEQEND")))

The z2, z3, …are ignored and I get a 2D polyline. What is wrong?

SMadsen

  • Guest
Q: Entmake a 3Dpoly
« Reply #1 on: October 21, 2004, 04:29:25 AM »
Hi Fuccaro,
Try changing the vertex classes to (100 . "AcDb3dPolylineVertex")

Also add a 70 flag of 8 to the main ent and 32 to the vertices (otherwise it'll still make an oldstyle 2D pline).

Code: [Select]
(entmake (list (cons 0 "POLYLINE") (cons 66 1)
               (cons 100 "AcDb3dPolyline")'(70 . 8)))

(entmake (list (cons 0 "VERTEX")
               '(100 . "AcDb3dPolylineVertex")
               '(70 . 32)
               (list 10 x1 y1 z1)))

(entmake (list (cons 0 "VERTEX")
               '(100 . "AcDb3dPolylineVertex")
               '(70 . 32)
               (list 10 x2 y2 z2)))

(entmake '((0 . "SEQEND")))

Fuccaro

  • Guest
Q: Entmake a 3Dpoly
« Reply #2 on: October 21, 2004, 05:23:02 AM »
It works fine. Thank you SMadsen!  :)