Jump to content

how to convert lines to polylines


gvgbabu

Recommended Posts

hi all

 

can anybody help me to write a lisp for converting lines in a layer to polylines

it needs lisp or any command is there for that

 

thanks in advance

 

ganesh

Link to comment
Share on other sites

(defun C:L2P ( / ss)
 ;;; Line 2 Polyline
 (setq ss (ssget "_I"))
 (while (not ss)(setq ss (ssget)))
 (if (and (getvar "PEDITACCEPT") (= (getvar "PEDITACCEPT") 1))
   (vl-cmdf "_pedit" "_Multiple" ss "" "")
   (vl-cmdf "_pedit" "_Multiple" ss "" "_Y" "")
   )
 )
(defun C:L2PJ ( / ss)
 ;;; Line 2 Polyline + Join (fuzz = 0)
 (setq ss (ssget "_I"))
 (while (not ss)(setq ss (ssget)))
 (if (and (getvar "PEDITACCEPT") (= (getvar "PEDITACCEPT") 1))
   (vl-cmdf "_pedit" "_Multiple" ss "" "_Join" 0 "")
   (vl-cmdf "_pedit" "_Multiple" ss "" "_Y" "_Join" 0 "")
   )
 )

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...