賤人外掛可以,或者新建一個文字,貼上進去,重新命名為as.lsp,在cad命令列輸入 ap 找到剛才的as。lsp檔案 輸as 就可以呼叫了(print "文字數字求和(型如:釘23,釘23.12m,23.12M,釘20米,多行文字先炸開,不支援負數),命令:as")(defun c:as(/ all endno aa bb cc wz tha tsum i) (if (null xzz) (setq xzz 0)) (setq ALL (ssget(list (cons 0 "text")))) (if all (SETQ nn (SSLENGTH ALL))) (setq endno 0) (setq tsum 0 i 0) (WHILE (and (---數字 ")) (setq endno (+ endno 1)) ) (print (strcat "共" (itoa i) "個文字,和=" (rtos tsum))) (print));;;(defun rdata(str / len i aa) (if (> (strlen str) 0) (progn (setq i (strlen str)) (setq aa(substr str (strlen str) 1)) (while (and (or (and (>= aa "0") (= i 1) ) (setq i(1- i)) (if (>= i 1) (setq aa(substr str i 1))) ) ) ) (setq i i))
賤人外掛可以,或者新建一個文字,貼上進去,重新命名為as.lsp,在cad命令列輸入 ap 找到剛才的as。lsp檔案 輸as 就可以呼叫了(print "文字數字求和(型如:釘23,釘23.12m,23.12M,釘20米,多行文字先炸開,不支援負數),命令:as")(defun c:as(/ all endno aa bb cc wz tha tsum i) (if (null xzz) (setq xzz 0)) (setq ALL (ssget(list (cons 0 "text")))) (if all (SETQ nn (SSLENGTH ALL))) (setq endno 0) (setq tsum 0 i 0) (WHILE (and (---數字 ")) (setq endno (+ endno 1)) ) (print (strcat "共" (itoa i) "個文字,和=" (rtos tsum))) (print));;;(defun rdata(str / len i aa) (if (> (strlen str) 0) (progn (setq i (strlen str)) (setq aa(substr str (strlen str) 1)) (while (and (or (and (>= aa "0") (= i 1) ) (setq i(1- i)) (if (>= i 1) (setq aa(substr str i 1))) ) ) ) (setq i i))