本帖最后由 Gu_xl 于 2014-7-14 11:00 编辑
 - ;;;拾取数字求和
- (defun c:qh (/ ss n totn adn)
- (prompt "欢迎使用数字求和! 。 ")
- (prompt "\n拾取数字求和: ")
- (setq ss (ssget '((0 . "mTEXT")))
- n 0
- )
- (setq totn 0.000)
- (while (setq en (ssname ss n))
- (setq adn (atof (cdr (assoc 1 (entget en)))))
- (setq totn (+ totn adn))
- (setq n (1+ n))
- )
- (princ (strcat "\n数字和: "))
- (princ totn)
- (princ)
- )
多行文字与单行文字,一起选择然后求和!
我怎么整都整不出来 ,谁能帮帮忙改编一下谢谢!
|