kocbek6 Posted April 16, 2021 Posted April 16, 2021 Hello, I want to know if there is an existing lisp routine that changes block attributes - tags? First image is an example of first block that I have, and second one represents what I want. So I want to change tag name from "točka" to "oznaka" and "H" to "visina". Don't want to change values, just names. I tried BEDIT, but doesen't work very well. Thanks! Quote
kocbek6 Posted April 19, 2021 Author Posted April 19, 2021 Thank you, but as far as I know, BATTMAN works for one block at the time. In my case where I have over 200 blocks, this command isn't very useful. Quote
mhupp Posted April 19, 2021 Posted April 19, 2021 (edited) quick google found this. reading over the comments you might want to edit the code so it changes all of the same blocks. https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-replace-tag-name-using-lisp/td-p/2316708 (prompt "\nPick All Blocks to Change: ") (setq ss (ssget)) change to (setq ent (car (entsel "\nSelect Block: "))) (eq (cdr (assoc 0 (entget ent))) "INSERT") (setq BlkName (vla-get-effectivename (vlax-ename->vla-object ent))) (setq SS (ssget "_X" (list (cons 0 "INSERT") (cons 2 BlkName)))) So you don't have to select all of them one at a time. Edited April 20, 2021 by mhupp Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.