Jump to content

Recommended Posts

Posted

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.

slika.png.1119eca7a5e6fd6854d69dd959a0edc0.png

 

 

slika.thumb.png.e0c96048327c98156e570c436fd98aaf.png

 

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!

Posted

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.

Posted (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 by mhupp

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...