@stusic
Thanks for the tip.
I really appreciate your help too.
Cheers.
|
@stusic
Thanks for the tip.
I really appreciate your help too.
Cheers.
Sure, take out that code on your post and i'll update the previous one.
Question for you, do you want the "sequential number" to continue on the next run? say you select 3 "Banana" block , that wil be converted to "Banana1" "Banana2" and "Banana3" , the reason i ask is, if you run the routine again on the same dwg session and you have already up to say "Banana72" , the program will slow down a bit as it progress, it always starts with "1", but it is as easy as setting a variable global to pick up the last number used, but then again there are still issues with that, like deleted blocks already processed/or selecting "done" blocks <some would know what i mean>
Anyhoo, its not really a big deal. especially if the sequence doesnt really matter. (or does it?)
I can tweaked the code a bit so you can select different block names in one go and sequentially rename them.
will that work for you?
@pbejse
This code is excellent! Works perfect!
But now the sequence doesn't matter, I have to rename the block with a specific name or number.Anyhoo, its not really a big deal. especially if the sequence doesnt really matter.
Can you help me, please?
Thank you
Billy
That is a good idea Billyjow. I can still see the code on your post dude. Remove that to avoid confusion, THEN i will post the revised code.
maybe you mis-understood me BILLYJOW, i'm not asking you to delete the code on your computer. Remove the code on ONLY on your post to avoid other forum members as to what is the latest/updated routine on this thread
Last edited by pbejse; 2013-01-09 at 03:20 PM.
@pbejse,
I think the code isn't working as I wanted to.
I'd like to rename each block with a specific name, without prefix or prefix.
e.g. block name - ECT, change to TCE
Regards
Last edited by BILLYJOW; 2013-01-09 at 04:49 PM.
Hi,
I need help, guys.
How Can I change the code to allow rename block's names that already exist?
Thank in advance
Code:(defun c:BlockRename () (vl-load-com) (setq bname (vla-get-EffectiveName (vlax-ename->vla-object (car(entsel "\nSelect block: "))))) (command "rename" "block" bname pause) );DEFUNCode:A block named "224" already exists.
I see
That is a problem is it not? Now going back to the posted codes. Lets start over. What will be the action if the name already does exist? put a number after the name?
And are you aware that BlockRename routine will change every instances of the block with the same name? is that what you are really after?