Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

a by layer polyline join..

4 REPLIES 4
Reply
Message 1 of 5
Anonymous
133 Views, 4 Replies

a by layer polyline join..

is there a way to join/convert lines/arcs to polylines per layer, one layer
at a time?

--
A2Ki, SurvCad CES, Win98 se
Remove NO SPAM from my email address to email

Jonathan J. Baker
R&R Engineers-Surveyors, Inc.
Denver, Colorado
_________________________
4 REPLIES 4
Message 2 of 5
Anonymous
in reply to: Anonymous

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...
Message 3 of 5
Anonymous
in reply to: Anonymous

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...
>
>
>
Message 4 of 5
Anonymous
in reply to: Anonymous

Jon Baker wrote:

> is there a way to join/convert lines/arcs to polylines per layer, one layer
> at a time?

> A2Ki, SurvCad CES, Win98 se

Join Nearest under the Edit menu of the SurvCADD CES in your tag line!

Terry
Message 5 of 5
Anonymous
in reply to: Anonymous

boy i really need to look further into this survcad stuff... i have it but
only use a few commands...

--
A2Ki, SurvCad CES, Win98 se
Remove NO SPAM from my email address to email

Jonathan J. Baker
R&R Engineers-Surveyors, Inc.
Denver, Colorado
_________________________
"Terry W. Dotson" wrote in message
news:3BB534D8.B1059713@dotsoft.com...
> Jon Baker wrote:
>
> > is there a way to join/convert lines/arcs to polylines per layer, one
layer
> > at a time?
>
> > A2Ki, SurvCad CES, Win98 se
>
> Join Nearest under the Edit menu of the SurvCADD CES in your tag line!
>
> Terry

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost