View Full Version : Conver ALL lines to polylines?
kasanoff
24th Aug 2007, 12:54 pm
Hi All,
I've found simply way to conver line to polyline (below .lsp) but the only thing is that I have to select each line separately. Is it a way to convert all selected lines to polylines (without joining)?
(defun c:cp (/ ob) ;changes a line or arc to a polyline;
(setq ob (entsel))
(princ "Select line or arc: ")
(command "_pedit" ob "_y" ""))
Regards
Alan Cullen
24th Aug 2007, 01:02 pm
Try Pedit with the MULTIPLE option.
This has been discussed here at length recently. So a search would definitely help you here.
If you still have problems, then please get back to us. :D
Frank the Frowner
24th Aug 2007, 02:35 pm
I would select everything from the drawing, go to my properties window, sort it out by lines, then type in 'pe' and convert
SLW210
24th Aug 2007, 02:42 pm
_PEDIT m (for Multiple) select the entire drawing and hit enter. All lines will be polylines.
Alan Cullen
24th Aug 2007, 02:50 pm
Hey, SLW210,
I see you are right up there on the hit list, well done mate.
Oops, off topic, sorry. :(
fuccaro
24th Aug 2007, 03:46 pm
You could start from something like this:
(defun c:L2PL()
(setq peditaccept (getvar "PEDITACCEPT"))
(setq peditaccept 1)
(setq ss (ssget "X" (list '(0 . "LINE"))))
(repeat (setq i (sslength ss))
(setq l1 (ssname ss (setq i (1- i))))
(command "_.PEDIT" l1 "" "")
)
(setvar "PEDITACCEPT" peditaccept)
)Good luck!
******** editing *********
oops! reading again I see that you wish to operate on all the lines you select, not all the lines in the drawing. A minor change in the 4th line of the routine will do what you wish. I will let you to discover how to pass the selection set to the lisp -post here monday if you need help.
Powered by vBulletin™ Version 4.1.2 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.