一个小小的建议,而不是担心从选择集中删除只需滚动所有项目。
- (if (setq ss (ssget "X" '((0 . "insert")(2 . "Drawing_Sheet_*,"))))
- (progn
- (setq x -1)
- (while (setq ent (ssname ss (setq x (+ x 1))))
- ;my replacement code example
- (setq oldtag1 "Drawing_number") ;attribute tag name
- (foreach att (vlax-invoke (vlax-ename->vla-object (ssname SS x )) 'getattributes)
- (if (= oldtag1 (strcase (vla-get-tagstring att)))
- (vla-put-textstring att drawingname)
- ) ; end if
- )
[code][/code] |