试试这个mods。
- (defun c:Test (/ doc )
- ;; Tharwat - 29.Nov.2016 ;;
- (setq doc (vla-get-ActiveDocument (vlax-get-acad-object)))
- (vlax-for x (vla-get-layouts doc)
- (if (/= (vla-get-name x) "Model")
- (vlax-for b (vla-get-block x)
- (and (eq (vla-get-objectname b) "AcDbBlockReference")
- (eq (vla-get-effectivename b) "TILTEBLOCK")
- (vl-some
- '(lambda (a)
- (and (eq "LAYOUT" (strcase (vla-get-tagstring a)))
- (progn
- (vla-put-textstring a "%<\\AcVar ctab>%") t)
- )
- )
- (vlax-invoke b 'getattributes)
- )
- )
- )
- )
- )
- (vla-regen doc acAllViewports)
- (princ)
- )(vl-load-com)
|