TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: V-Man on July 06, 2007, 12:48:52 PM

Title: Regions to Lwpolylines
Post by: V-Man on July 06, 2007, 12:48:52 PM

How Do you go about turning loads of Regions into Lwpolylines?
Title: Re: Regions to Lwpolylines
Post by: Jeff_M on July 06, 2007, 01:06:18 PM
Like this....
Code: [Select]
(defun c:Reg2Poly (/ ss)
  (if (setq ss (ssget '((0 . "REGION"))))
    (progn
      (setvar "qaflags" 1)
      (command ".explode" ss "")
      (setvar "qaflags" 0)
      (if (= 1 (getvar "peditaccept"))
(command ".pedit" "m" "p" "" "j" "" "")
(command ".pedit" "m" "p" "" "y" "j" "" "")
)
      )
    )
  (princ)
  )
Title: Re: Regions to Lwpolylines
Post by: V-Man on July 06, 2007, 02:51:58 PM

Thanks much. Your my hero!  :-)