วันพุธที่ 2 ธันวาคม พ.ศ. 2563

Polyline Join

 

;; converse line ,arc ,polyline join to Polyline

(defun C:PLJ (/ old_cmdecho old_peditaccept ss) ; = Polyline Join

    (setq old_cmdecho (getvar 'cmdecho) ;save variable

                old_peditaccept (getvar 'peditaccept)

       );setq

       (setvar 'cmdecho 0) ;setting variable

       (setvar 'peditaccept 1)

       (princ "\nSelect line,arc,polyline join to Polyline.")

       (setq ss (ssget '((0 . "LINE,ARC,*POLYLINE"))))  

       (if ss

              (if (= (sslength ss) 1)

                     (command "_.pedit" ss "_join" "_all" "" "");then

                     (command "_.pedit" "_multiple" ss "" "_join" "0.0" "");else

              );if

              (princ "\nCancle...")

       );if

       (setvar 'cmdecho old_cmdecho) ;old variable

       (setvar 'peditaccept old_peditaccept)

(princ)

);end

(prompt "\nEnter PLJ to start. ")

1 ความคิดเห็น: