hello expert friends, always thanks
should I get block rename lsp???
there are same blocks and select blocks, and then change blocks name
I attached jpg file. waitting for some help. advanced thank you all
Solved! Go to Solution.
Solved by Kent1Cooper. Go to Solution.
Hi
Check this.....
http://www.lee-mac.com/copyblock.html
Hi
First thing You can not Rename the existing Blocks in a drawing with SAME name......
And what I got from your attached image ...... The blocks which you want to rename, are same block with same properties (scale factor, rotation, layer .... etc.).......
In that case I suggest to copy a Block with New Name and insert the Newly Named Block in place of Old Block (The Blocks which you want to Rename) ........
Try this ...... I had made some rough changes in @Lee_Mac code....
@Anonymous wrote:
.… should I get block rename lsp???
there are same blocks and select blocks, and then change blocks name ....
I think Blockreplace.lsp with its BRS command, >here<, may do what you want. It allows selection of multiple Blocks to be replaced, and replaces each with the Block name you've specified, at the same rotation and scale(s), and on the same Layer, etc., as the one(s) being replaced.
The way I always do this is to:
Select all the blocks you want to rename.
Copy them with basepoint 0,0,0
Paste in new drawing with basepoint 0,0,0
Rename the block. (you can use the rename command)
Delete the original set of blocks from the 1st drawing
Copy newly named blocks from 2nd drawing back into the 1st drawing with the same process as before.
Hi
@Shneuph wrote:
The way I always do this is to:
Select all the blocks you want to rename.
Copy them with basepoint 0,0,0
Paste in new drawing with basepoint 0,0,0
Rename the block. (you can use the rename command)
Delete the original set of blocks from the 1st drawing
Copy newly named blocks from 2nd drawing back into the 1st drawing with the same process as before.
The above way you will Rename all the existing Blocks in the Drawing......
Here the Requirement is to Rename few selected Blocks ........... Which is not possible without Copying the Block with a New Name & Reinserting them at the Selected Blocks Position (Simply Replacing the Selected Blocks with New one).....
"Select all the blocks you want to rename."
You select only the blocks you want to rename.. Then copy them back. The leftover blocks in dwg 1 with the same name will remain. The ones you did the copying to will have their new name and copy back into the original drawing leaving the ones you left intentionally.
See Screencast
This is a singular pick but generic one I believe.
https://autolispprograms.wordpress.com/rename-a-block/
@Anonymous wrote:
.... there are same blocks and select blocks, and then change blocks name ....
Can we get a clarification? I'm not sure any more what you mean by "rename" and "change blocks name" in this situation.
Are you talking about picking some of the "xo-1" Blocks in your example, and changing them to Blocks of the name "aaa"? That is, replacing them with "aaa" Blocks? With "aaa" already being a Block defined in the drawing? And if the "aaa" Block definition is different from the "xo-1" Block, they would look different [which they don't in your image]? That is what I assumed from the wording in the image, and it is what my BlockReplace.lsp routines do.
Or [since they don't look any different in your image] do you mean that you want a new Block definition created, that is the same as the "xo-1" Block but has the new name "aaa" instead? [Presumably you would not want two identical Block definitions under different names, but you would then edit the new one with whatever differences you need.] If that's what you're after, there are routines out there to make a new Block out of an existing one, such as my BlockDupNewName.lsp with its BDN command, which is in the .zip file attached >here<, or several on the Cadalyst CAD Tips site such as >this one< and >this other one<, and no doubt others.
@Kent1Cooper wrote:
.... to make a new Block out of an existing one, such as my BlockDupNewName.lsp with its BDN command....
For anyone who finds this looking for that kind of thing, BlockDupNewName.lsp has been upgraded [attached].
Aside from making the Undo begin-end operation suited to newer versions, and a small correction, this is what's improved:
It now uses a text-editing window up in the screen, rather than asking for a new name at the Command line. That window is pre-populated with the name of the current Block and a hyphenated-number suffix. So if a lot of the new name you want is the same as the old one, you can leave most of it and edit just part(s) of it, and don't need to type the whole thing in, as you did before if you didn't want the offered numerical-suffix new name.
It used to ask again if you either typed in a Block name already in the drawing or only a space or spaces, but it now also asks again if you "empty" the string in the editing window to nothing.
It used to offer a new Block name only by adding a hyphenated-number suffix on the selected Block's name. That meant that if you had used BDN on something before, for instance starting with a Block named "Block" and you had accepted the offered new name of "Block-1" [or other suffixed number], and then you later used it again on one of those "Block-1" Blocks, it used to offer "Block-1-1" as the new name. It now recognizes that the old name was likely the result of a BDN operation, and [whether that was the origin, or for any Block name ending in a hyphen and number(s) only] it offers the next available number suffix, in that case offering "Block-2" [if that isn't already used, similarly incrementing up from there if it is].
@arpansark0544TCX wrote:
This program is quite useful as it saves some time to search for block names.
Thank you.
You're welcome anytime.
Can't find what you're looking for? Ask the community or share your knowledge.