Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 27

Thread: Rename Blocks?

  1. #11
    100 Club
    Join Date
    2012-08
    Posts
    111
    Login to Give a bone
    0

    Default Re: Rename Blocks?

    @stusic

    Thanks for the tip.
    I really appreciate your help too.

    Cheers.

  2. #12
    All AUGI, all the time
    Join Date
    2010-10
    Posts
    535
    Login to Give a bone
    0

    Default Re: Rename Blocks?

    Quote Originally Posted by BILLYJOW View Post
    ..........Many Thanks ..
    Glad i could help BillyJow

    Cheers

  3. #13
    All AUGI, all the time
    Join Date
    2010-10
    Posts
    535
    Login to Give a bone
    0

    Default Re: Rename Blocks?

    Quote Originally Posted by BILLYJOW View Post
    Hi all,
    May I ask you a simple request?
    I'd like to take off the sufixo in my code. I just like to leave the block's name.

    Could you help me , please?

    thank in advance
    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?

  4. #14
    100 Club
    Join Date
    2012-08
    Posts
    111
    Login to Give a bone
    0

    Default Re: Rename Blocks?

    @pbejse
    This code is excellent! Works perfect!

    Anyhoo, its not really a big deal. especially if the sequence doesnt really matter.
    But now the sequence doesn't matter, I have to rename the block with a specific name or number.

    Can you help me, please?
    Thank you
    Billy

  5. #15
    All AUGI, all the time
    Join Date
    2010-10
    Posts
    535
    Login to Give a bone
    0

    Default Re: Rename Blocks?

    Quote Originally Posted by BILLYJOW View Post
    But now the sequence doesn't matter, I have to rename the block with a specific name or number....
    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.

  6. #16
    100 Club
    Join Date
    2012-08
    Posts
    111
    Login to Give a bone
    0

    Default Re: Rename Blocks?

    Quote Originally Posted by pbejse View Post
    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
    lol
    Sorry for my poor english
    I've already removed my post, pbejse

    Regards

  7. #17
    All AUGI, all the time
    Join Date
    2010-10
    Posts
    535
    Login to Give a bone
    0

    Default Re: Rename Blocks?

    Quote Originally Posted by BILLYJOW View Post
    lol
    Sorry for my poor english
    I've already removed my post, pbejse

    Regards
    No worries... CODE UPDATED: [Additional that is]

    (MTDN '("Blockname" "Anotherblock"));<-- supply your block name/s in a form of a list, only this blocks will be allowed in the selection

    HTH

  8. #18
    100 Club
    Join Date
    2012-08
    Posts
    111
    Login to Give a bone
    0

    Default Re: Rename Blocks?

    @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.

  9. #19
    100 Club
    Join Date
    2012-08
    Posts
    111
    Login to Give a bone
    0

    Default Re: Rename Blocks?

    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)
      );DEFUN
    Code:
    A block named "224" already exists.

  10. #20
    All AUGI, all the time
    Join Date
    2010-10
    Posts
    535
    Login to Give a bone
    0

    Default Re: Rename Blocks?

    Quote Originally Posted by BILLYJOW View Post
    @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
    I see

    Quote Originally Posted by BILLYJOW View Post
    Hi,
    I need help, guys.
    How Can I change the code to allow rename block's names that already exist?
    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?

Page 2 of 3 FirstFirst 123 LastLast

Similar Threads

  1. rename selected blocks
    By autocad.wishlist1734 in forum AutoCAD Wish List
    Replies: 1
    Last Post: 2017-08-10, 08:46 AM
  2. Rename Blocks and Multi-View Blocks within AutoCAD
    By Wish List System in forum ACA Wish List
    Replies: 3
    Last Post: 2013-12-06, 08:53 AM
  3. Rename multiple blocks
    By knutsen in forum AutoLISP
    Replies: 4
    Last Post: 2012-09-06, 07:48 AM
  4. Rename blocks
    By godfrey0417 in forum AutoCAD Tips & Tricks
    Replies: 2
    Last Post: 2007-10-12, 03:38 PM
  5. Rename Anonymous Blocks
    By autocad.wishlist1734 in forum AutoCAD Wish List
    Replies: 2
    Last Post: 2007-08-23, 12:10 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •