是的,我的“边界”层中有一个文本实体,它是(例如A=45000平方米)。。
不,我没有忽略你的代码,我问过一次如何使用你发布的代码,因为我不知道如何使用它,但你不再回复了。。。。
你的代码对我来说并不完美,它只显示“太少的参数”
Tharwat回复,因此我使用了他的代码,并通过添加此代码使我自己的方式适合我。
- (defun add-comma (txt / strl cont1 lth cont txt1)
- (setq strl (strlen txt)
- cont1 1
- txt1 "")
- (while (and (/= (substr txt cont1 1) ".") (<= cont1 strl))
- (setq cont1 (1+ cont1)))
- (setq lth (1- cont1)
- cont1 1
- cont (1- lth))
- (if (> lth 3)
- (progn
- (while (< cont1 lth)
- (setq let (substr txt cont1 1)
- txt1 (strcat txt1 let))
- (if (and (zerop (rem cont 3)) (eq (type (read let)) 'INT))
- (setq txt1 (strcat txt1 ",")))
- (setq cont (1- cont)
- cont1 (1+ cont1)))
- (while (<= cont1 strl)
- (setq txt1 (strcat txt1 (substr txt cont1 1))
- cont1 (1+ cont1)))
- txt1)
- txt))
HTH公司 |