Ps更改外部图纸、重新编号、作者、设计师、日期等
(setq oldtag1 "SHT_NO") ;attribute tag name
(setq newstr1 (rtos sheetnum 2 0))
(setq oldtag2 "DRG_NO") ;attribute tag name
(setq oldtag3 "PROJ_NO") ;attribute tag name
(setq newstr3 dwgname)
(setq oldtag4 "REV_NO") ;attribute tag name
(setq oldtag5 "REV1") ;attribute tag name
(setq newstr5 "-")
(foreach att (vlax-invoke (vlax-ename->vla-object (ssname SS1 0 )) 'getattributes)
(if (= oldtag1 (strcase (vla-get-tagstring att)))
(vla-put-textstring att newstr1)
) ; end if
(if (= oldtag2 (strcase (vla-get-tagstring att)))
(vla-put-textstring att newstr2)
) ; end if
(if (= oldtag3 (strcase (vla-get-tagstring att)))
(vla-put-textstring att newstr3)
) ; end if
页:
1
[2]