วันอังคารที่ 9 มีนาคม พ.ศ. 2564

WIPEOUT TO POLYLINE

;|

      WIPEOUT TO POLYLINE

      - Select Blocks or Wipeout converse to polyline

|;

(defun c:wo2pl ()

      (setq pe (getvar 'PEDITACCEPT))

      (setvar 'PEDITACCEPT 1)     

      (setq ss (ssget '((0 . "INSERT,WIPEOUT"))))

      (setq i 0)

      (while (setq e (ssname ss i))      

            (setq en (cdr (assoc 0 (entget e))))

        (if (= en "WIPEOUT")

                  (progn

                        (command "_explode" e "")

                        (setq ss0 (ssget "_P"))

                        (command "_.pedit" "_M" ss0 "" "_J" "" "")

                  )

                  (progn

                        (command "_explode" e "")

                        (setq ssb (ssget "_P"))

                        (command "_explode" ssb "")

                        (setq ss0 (ssget "_P"))

                        (command "_.pedit" "_M" ss0 "" "_J" "" "")

                  )

            )

            (setq i (1+ i))

      )

      (setvar 'PEDITACCEPT pe)

(princ)

)

(prompt "\nEnter WO2PL to start. ")

ไม่มีความคิดเห็น:

แสดงความคิดเห็น