changing block names

changing block names

Anonymous
Not applicable
1,547 Views
4 Replies
Message 1 of 5

changing block names

Anonymous
Not applicable

Good day!

 

I have 100 of blocks in my dwg and the block names listed below

BLK_LT_CCT_01

BLK_LT_CCT_02

BLK_LT_CCT_03

BLK_LT_CCT_04

BLK_LT_CCT_05

BLK_LT_CCT_06

BLK_LT_CCT_07

BLK_LT_CCT_08

And so on.

 

Is it possible to select all of those blocks and change the block name into BLK_LT_CCT_001 only?

Is there a LISP or fastest way to solve this?.

 

Thanks .

 

Ram,

0 Likes
1,548 Views
4 Replies
Replies (4)
Message 2 of 5

MikeKovacik4928
Advisor
Advisor

If they are all different blocks, why would you want to have them all as one block?

 

It is not possible, as far as I know to rename multiple blocks to one name.

The rename command fails to do so (see attached) because it wants each

separate block renamed to have a different name.

 

You can create a new block with all of them as nested blocks,

so that when you explode the new block, all the nested blocks are now present 

as blocks in their own right.

 

Michael Kovacik
AutoCAD 2d & 3d (29 yrs)& Inventor (7 yrs)
Manufacturing (30 yrs) Draughtsman
Autodesk Product Design Suite Ultimate 2018
Johannesburg, South Africa

Autocad 2018, Inventor Pro 2018
(and recently Autocad Customisation)

(Impossible only means you haven't
found the solution yet)

 

 

0 Likes
Message 3 of 5

imadHabash
Mentor
Mentor

Hi,

 

>> Is it possible to select all of those blocks and change the block name into BLK_LT_CCT_001 only? <<

i would like to say the follow :

  • there is NO need to select all blocks (as you said) for renaming procedure.
  • blocks MUST have their own specified names.
  • since you have 100 block then you will have 100 block name.

if you tell us what you want to achieve you may found more suitable solutions.

 

 

Regards,

Imad Habash

EESignature

0 Likes
Message 4 of 5

Kent1Cooper
Consultant
Consultant

@Anonymous wrote:

.... 

I have 100 of blocks in my dwg and the block names listed below

BLK_LT_CCT_01

....And so on.

 

Is it possible to select all of those blocks and change the block name into BLK_LT_CCT_001 only?

Is there a LISP or fastest way to solve this?.

....


If by "chang[ing] the block name" you mean you want to replace  all those similarly-named Blocks with equivalent insertions of just the one  Block named BLK_LT_CCT_001, you can use BlockReplace.lsp [attached].  Use its BRS command [which stands for Block Replace, Selected], and when it asks for:

 

  Block to Replace existing Block(s) with <it will offer Insert's default if any>:

 

give it BLK_LT_CCT_001, and when it says:

  To replace Block insertion(s) with BLK_LT_CCT_001,
  Select objects:

 

give it (ssget "_X" '((2 . "BLK_LT_CCT_*")))

 

to find all Block insertions whose names start that way.  It will replace them all, keeping each one's Layer, insertion point, scale factor(s), rotation, etc., and just changing them to be insertions of the BLK_LT_CCT_001 Block instead.

Kent Cooper, AIA
Message 5 of 5

Anonymous
Not applicable

can you share how you did 

0 Likes