Message 1 of 13

Not applicable
09-27-2021
12:25 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
AutoCAD Mechanical 2019
I have several drawing border blocks (different sizes) they use the same named attributes. DWG_NO, DESC, ECN, and REV. We have been using some various lisp programs out there to change these attributes but most require selecting the border to get the attribute tag and value. I know the tag and the value is being pulled from a environment variable so I do not need retrieved those, I only need to plug in the values to all the tags for all the blocks.
(defun c:popatt (/dwgno desc1 ecn1 rev1)
(setq dwgno "12345")
(setq desc1 "MY DWG")
(setq ecn1 "4321")
(setq rev1 "B")
;block attribute tags for all blocks
; DWG_NO
; DESC
; ECN
; REV
;program that needs help
(vla-put-textstring DWG_NO dwgno)
(vla-put-textstring DESC desc1)
(vla-put-textstring ECN ecn1)
(vla-put-textstring REV rev1)
(do for all blocks)
); end
Solved! Go to Solution.