But how do I procede from here? the number of user inputs
varies--sometimes only 2 blocks, sometimes 10 or more. How do I use
(entmake) to create a line or, preferably a pline, from a list of
points, when the number of points changes each time?
It's really quite easy, although it seems difficult before you try it out.
I know I have something that you can use for a 'sample'. If I can dig it up
here, I'll send it to you.
BTW, a LWPolyline would probably be easier to entmake, however I haven't yet
tried that.
Barry Shevitz <bar...@netvision.net.il> wrote in message
news:396DFE8C...@netvision.net.il...
> But how do I procede from here? the number of user inputs
> varies--sometimes only 2 blocks, sometimes 10 or more. How do I use
> (entmake) to create a line or, preferably a pline, from a list of
> points, when the number of points changes each time?
Hello,
here a example
;;--------------------------------------------
(setq counter 0)
(entmake (quote (( 0 . "POLYLINE")(62 . 5)(66 . 1)) ))
(repeat (length Liste) ;; Liste contents the points
(setq counter (1+ counter))
(setq Vertex_dxf_42 (car (nth counter Liste))) ;; if Vertex_dxf_42
/= 0.0 go to next point with an ARC
(setq Vertex_dxf_10 (cadr (nth counter Liste))) ;; Vertex_dxf_10 it's a
Point of the Polyline
(entmake (list (cons 0 "VERTEX") Vertex_dxf_42 Vertex_dxf_10))
(setq counter (1+ counter))
); repeat
(entmake (quote (( 0 . "SEQEND"))))
;;--------------------------------------------
I hope it's help you
Greeting from Germany
Helmut