Renaming Blocks

Renaming Blocks

JMARTINEZP5F4F
Participant Participant
925 Views
9 Replies
Message 1 of 10

Renaming Blocks

JMARTINEZP5F4F
Participant
Participant

looking for lsp that'll make renaming blocks faster and easier

0 Likes
Accepted solutions (1)
926 Views
9 Replies
Replies (9)
Message 2 of 10

CodeDing
Advisor
Advisor

@JMARTINEZP5F4F ,

 

Can you define what 'Faster' and 'Easier' looks like for you?

Please explain to us what your PERFECT version of renaming blocks looks like.

 

That should help this thread a bunch

 

Best,

~DD

Message 3 of 10

Kent1Cooper
Consultant
Consultant
Accepted solution

My routine for that is the RB command defined in RenameBlock.lsp, attached.  [There are links in the Forum to a site where downloading it is not currently working, and with slightly older versions.]

 

Just pick a Block insertion, and it asks for a new name in a text-editing box, with the current one filled so you can change just limited parts if you want, or add a suffix or something, but you can edit it to be anything you want.  You do not need to know the current Block name as you would in a RENAME command.

 

If you want to do this with the wacky Block names created by the PASTEBLOCK command, like "A$Cf53a89dd", you can prevent those completely with an undefinition and redefinition of the command, forcing you to give the resulting Block a meaningful name.  Try PasteBlockWithName.lsp, >here<.  Have that loaded by acaddoc.lsp, and it will operate in all drawings, and you will never get a wacky name again.

Kent Cooper, AIA
Message 4 of 10

pendean
Community Legend
Community Legend

@JMARTINEZP5F4F wrote:

looking for lsp that'll make renaming blocks faster and easier


What did you find with a search so far? And why did they not work for you? there are a handful of solutions in this one older post for example

https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/block-rename-lsp/td-p/8432296 

 

 

Message 5 of 10

JMARTINEZP5F4F
Participant
Participant

Essentially being able to just highlight the block and run a command to open a dialogue box to edit the name

Message 6 of 10

JMARTINEZP5F4F
Participant
Participant

not sure if it's because they were for older versions of autocad or maybe i'm just running them incorrectly

 

0 Likes
Message 7 of 10

Kent1Cooper
Consultant
Consultant

@JMARTINEZP5F4F wrote:

Essentially being able to just highlight the block and run a command to open a dialogue box to edit the name


That's exactly how RB [Message 3] works, in either noun-verb or verb-noun order.

Kent Cooper, AIA
Message 8 of 10

JMARTINEZP5F4F
Participant
Participant
Thank you!
0 Likes
Message 9 of 10

pendean
Community Legend
Community Legend

@JMARTINEZP5F4F wrote:

not sure if it's because they were for older versions of autocad or maybe i'm just running them incorrectly

 


The ones I tested in the link I shared all work just fine. Give them a try.

0 Likes
Message 10 of 10

Kent1Cooper
Consultant
Consultant

@pendean wrote:

....

The ones I tested in the link I shared all work just fine. Give them a try.

[But I believe only Message 10 there is about doing what is wanted here.  Other offerings are not about simply changing a Block name in RENAME fashion, but about changing a Block insertion to be an insertion of a different Block name, or creating a duplicate Block with a different name, or such things.]

Kent Cooper, AIA
0 Likes