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

WIPEOUT BLOCK TO POLYLINE

 

;|

      WIPEOUT BLOCK TO POLYLINE

      - Select Wipeout Blocks converse to polyline

|;

(defun c:WOB2PL ( / sel)

(setq old_cmdecho  (getvar "cmdecho"))

(setq pe (getvar 'PEDITACCEPT))

(setvar 'PEDITACCEPT 1)

(setvar "cmdecho" 0)

      (and (princ "\nSelect a Wipeout block : ")

            (setq sel (ssget "_+.:S:E:L" '((0 . "INSERT"))))

            (progn

                  (command "_.bedit" (cdr (assoc 2 (entget (ssname sel 0)))))

                  (if (setq sel (ssget "_X" '((0 . "WIPEOUT"))))

                        (progn

                        (command "_explode" sel "")

                        (setq ss0 (ssget "_P"))

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

                        );progn

                  );if

                  (command "_.bclose" "Save")

            );progn

      );and

(setvar 'PEDITACCEPT pe)

(setvar "cmdecho" old_cmdecho)

(princ)

)

(prompt "\nEnter WOB2PL to start. ")

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

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