Code Red > AutoLISP (Vanilla / Visual)

How to entmake a polyline

(1/2) > >>

DEVITG:
I have this two list holding the points coordinates and the bulge factor of a TO BE polyline.


--- Code: --- (setq ptnlist (list '(66.8823 62.975) '(123.03 109.175) '(160.462 152.625) '(236.978 165.825) '(263.951 212.025) '(334.962 221.925) '(347.072 230.725) '(473.681 217.525) '(475.883 187.825) '(452.763 124.025) '(378.449 95.425) '(292.576 52.525)))

(setq pt-qty (length ptnlist))


(setq blg-factor ' (0.0 0.0 0.0 0.465609 -1.22874 0.0 0.0 0.0 0.0 0.0 0.0 0.0))

(setq blg-qty (length blg-factor))
       
--- End code ---


How can I build the poly by ENTMAKE or other way aviable??

 Thanks in advance

Keith™:
Will this be a LWPolyline or a standard polyline? The procedure is different for each of them

Kerry:
Something like this ?


--- Code: ---(SETQ point-list (LIST '(66.8823 62.975)         '(123.03 109.175)
                       '(160.462 152.625)        '(236.978 165.825)
                       '(263.951 212.025)        '(334.962 221.925)
                       '(347.072 230.725)        '(473.681 217.525)
                       '(475.883 187.825)        '(452.763 124.025)
                       '(378.449 95.425)         '(292.576 52.525)
                      )
)

(SETQ bulge-list
        '(0.0 0.0 0.0 0.465609 -1.22874 0.0 0.0 0.0 0.0 0.0 0.0 0.0)
)



(ENTMAKE
   (APPLY
      (FUNCTION APPEND)
      (CONS (LIST '(0 . "LWPOLYLINE")
                  '(100 . "AcDbEntity")
                  '(67 . 0)
                  '(410 . "Model")
                  '(8 . "0")
                  ;; '(6 . "HIDDEN")              ; Linetype
                  ;;  (cons 62 acyellow)             ; Color
                  '(100 . "AcDbPolyline")
                  (CONS 90 (LENGTH point-list))   ; Vertices
                  '(70 . 0)
                  ;;'(70 . 1)                     ; Closed
            )
            (MAPCAR (FUNCTION LIST)
                    (MAPCAR (FUNCTION (LAMBDA (a) (CONS 10 a))) point-list)                   
                    (MAPCAR (FUNCTION (LAMBDA (b) (CONS 42 b))) bulge-list)
            )
      )
   )
)
--- End code ---

DEVITG:
Hi Kerry , that is what I need ,
Thanks for it.

ElpanovEvgeniy:
http://www.theswamp.org/index.php?topic=8878.msg114385#msg114385

Navigation

[0] Message Index

[#] Next page

Go to full version