;;========================================================= ; õ´ÜÀ§ ¼ýÀÚ ±¸ºÐÇϱâ(2000.11 ÁÖ¸»³óºÎ) ; ->¼ýÀÚÀÇ Ãµ´ÜÀ§¿¡ Äĸ¶À» Âï°Å³ª ¾ø¾Ö±â ; ->¹®ÀÚ¿Í ¼ýÀÚ°¡ È¥¿ëµÈ °Íµµ °¡´ÉÇÔ(2007.12.02) ;;------ comma o ------------------------------------------ (defun c:cmo(/ ss k n ed tx ntx txlen tem a1 ) (prompt "..Äĸ¶ Âï±â") (setq ss (ssget (list (cons 0 "text")))) (setq k 0) (command "undo" "be") (repeat (sslength ss) (setq ed (entget (ssname ss k))) (setq tx (cdr (assoc 1 ed))) (setq txlen (strlen tx)) (setq n txlen) (setq tem 0) (setq ntx "") (repeat txlen (setq a1 (substr tx n 1)) (if (and (>= (ascii a1) 48) (<= (ascii a1) 57)) (setq tem (+ tem 1)) (setq tem 0) ) (if (= tem 4) (setq ntx (strcat "," ntx) tem 1) ) (setq ntx (strcat a1 ntx)) (setq n (- n 1)) );repeat-2 (entmod (subst (cons 1 ntx) (assoc 1 ed) ed)) (setq k (+ k 1)) );repeat-1 (command "undo" "e") (prin1)) ;;------ comma x ------------------------------------------ (defun c:cmx(/ ss k n ed tx ntx txlen a1) (prompt "..Äĸ¶ ¾ø¾Ö±â") (setq ss (ssget (list (cons 0 "text")))) (setq k 0) (command "undo" "be") (repeat (sslength ss) (setq ed (entget (ssname ss k))) (setq tx (cdr (assoc 1 ed))) (setq txlen (strlen tx)) (setq n 1 tem 0 ntx "") (repeat txlen (setq a1 (substr tx n 1)) (if (/= a1 ",") (setq ntx (strcat ntx a1))) (setq n (+ n 1)) ) (entmod (subst (cons 1 ntx) (assoc 1 ed) ed)) (setq k (+ k 1)) ) (command "undo" "e") (prin1))