我没有检查这个过程,只知道在定义wcmatch列表时,空格也是一个字符,因此必须在过滤器列表中消除空格,如下所示:
- (defun C:SM ( / CurEnt CurObj CurSet1 CurSet2)
- (vl-load-com)
- (command "-style" "Existing" "simplex" "" "" "" "no" "no" "no")
- (command "-style" "Proposed" "Gill Sans MT" "" "" "" "no" "no")
- (setq CurSet1 (ssget "_x" '((0 . "TEXT")(7 . [b][color=magenta]"E100,E120,E50,E60"[/color][/b]))))
- (if CurSet1 (while (setq CurEnt (ssname CurSet1 0))
- (setq CurObj (vlax-ename->vla-object CurEnt))
- (ssdel CurEnt CurSet1)
- (vla-put-StyleName CurObj "Existing")
- (vla-Update CurObj)
- )
- )
- (princ)
- )
|