本帖最后由 ZZXXQQ 于 2014-1-17 08:12 编辑
(vlax-put-property ob 'Text "newstring")
改成
(vlax-put-property ob 'Text newstring)
试试
要不用下面的程序试试:- (defun C:qm ()
- (while (and
- (setq ent (entsel "\n请选择源文字:"))
- (setq ent (entget (car ent)))
- (wcmatch (cdr(assoc 0 ent)) "*TEXT")
- (setq newtxt (getstring "\n输入新的文字内容\n")))
- (entmod (subst (cons 1 newtxt) (assoc 1 ent) ent))
- )
- (princ)
- )
|