Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations GregLocock on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Create Polyline from List

Status
Not open for further replies.

cider

Civil/Environmental
Jan 8, 2002
5
I would like to draw a single polyline over a given
list of points.But I always get numerous polylines
(from point to point).
The pointlist has the format ((x1 y1 z1) (x2 y2 z2) ... (xn yn zn)).
The function looks like:

(While (<= counter
(- (length list1) 1)
)
(setq p1 (nth counter list1))
(setq p2 (nth (1+ counter) list1))
(setq zaehler (1+ counter))
(command &quot;_pline&quot; p1 p2 &quot;&quot;)

)

Any help would be appreciated!!
 
Replies continue below

Recommended for you

First begin pline command, then feed it points from within your while loop, then exit pline command, such as:
----------------------------------------------------------

(command &quot;_pline&quot;)
(While (<= counter
(- (length list1) 1)
)
(setq p1 (nth counter list1))
(setq p2 (nth (1+ counter) list1))
(setq zaehler (1+ counter))
(command p1)

)
(command &quot;&quot;)
 
Thanks for your quick response, CarlB.
Works fine!
 
Hi...

This is a form more easy:

(command &quot;_.pline&quot;)
(foreach pt list1
(command pt)
)
(command &quot;&quot;)

Un saludo de SpeedCAD... :)
CHILE
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor