sweet....
--
A2Ki, SurvCad CES, Win98 se
Remove NO SPAM from my email address to email
Jonathan J. Baker
R&R Engineers-Surveyors, Inc.
Denver, Colorado
_________________________
"Bobby Jones" wrote in message
news:6A19C7DD048E0F7A24F1CFCA0D05B67A@in.WebX.maYIadrTaRb...
> Here's a little function that finds plines, lwplines, lines, & arcs on the
> supplied layer name and joins them. You'll want to add code to toggle
> cmdecho and an error handler. I've also included a little loop that runs
> this code on every layer in the drawing. You can supply the layer list by
> whatever means you need.
>
> (defun joinPerLayer (LayerName / ss etype)
> (setq ss (ssget "_X" (list '(0 . "POLYLINE,LWPOLYLINE,LINE,ARC") (cons 8
> LayerName))))
> (if ss
> (progn
> (setq etype (cdr (assoc 0 (entget (ssname ss 0)))))
> (cond
> ((equal etype "LWPOLYLINE")
> (command "pedit" (ssname ss 0) "Join" ss "" "")
> )
> ((equal etype "POLYLINE")
> (command "pedit" (ssname ss 0) "Join" ss "" "")
> )
> (t
> (command "pedit" (ssname ss 0) "Yes" "Join" ss "" "")
> )
> )
> )
> )
> )
>
> ;;;Please see all the recent threads on releasing ActiveX objects
> (vlax-for objLayer (vla-get-layers (vla-get-activedocument
> (vlax-get-acad-object)))
> (joinPerLayer (vla-get-name objLayer))
> )
> --
> Bobby C. Jones
> Dots & Parens living in harmony...
>
>
>