+ Reply to Thread
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 12
  1. #1
    Forum Newbie
    Using
    AutoCAD 2008
    Join Date
    Jul 2007
    Location
    Portugal.Lx
    Posts
    2

    Default automatic numbering of block atributes.. is it possible??

    Registered forum members do not see this ad.

    Hi there all!I am new here and have a lot af questions to ask, but I dont wont to bombard all of you with my questions, so I will go easy on you guys

    I am counting all the doors in a project in autocad 2008, but It is becoming to be a real pain in the but because every time I change some door, I have to renumber almost every door .. I am sure there is an easier way to do that.. I am using a block with atributes and I would like to know if there is a way autocad can number automatically each block atribute.. I know that with mtext it is very easy (I use in my parking spaces) but with blocks I dont know how to do it .. ne1 has a clue ? like each time I put a block the number gets updated, and each time I take one off it gets updated again..

    thx a lot to all!!

  2. #2
    Full Member ascen707's Avatar
    Using
    AutoCAD 2006
    Join Date
    Jul 2007
    Location
    Vallejo,CA
    Posts
    50

    Default

    Do you want to just count them for your records or do you need to show the numbering on them?

    Just to count them try the bccount command it will count that perticular block or all the blocks in the drawing.

  3. #3
    Forum Newbie
    Using
    AutoCAD 2008
    Join Date
    Jul 2007
    Location
    Portugal.Lx
    Posts
    2

    Default

    no, I want the count to be shown on the plans. The counting can be done also in the tables at the data extraction moment.. I need them to be shown, in order if possible, in the plan..

  4. #4
    Full Member ascen707's Avatar
    Using
    AutoCAD 2006
    Join Date
    Jul 2007
    Location
    Vallejo,CA
    Posts
    50

    Default

    Here try this after you extracted open the doc. so you can read the command. I can't remember where I found this at! as soon as I find where I found it I will let you know. save a copy for later.

    Let us know if it works.

    Hope this work, Good luck!
    Attached Files

  5. #5
    Full Member
    Using
    AutoCAD 2006
    Join Date
    Nov 2009
    Posts
    30

    Default

    I too am facing the same problem.. The Lisp file attached works well for text but not for atttributes within blocks defining numbering... Somebody HELP!!!

  6. #6
    Junior Member TigerByTheTail's Avatar
    Using
    AutoCAD LT 2010
    Join Date
    Aug 2009
    Location
    Eastern Kansas, USA
    Posts
    21

    Default

    You would need to use some advanced LISP to modify the attribute text. I'm using LT (no LISP), so I use 2 macros to modify the attributes...one to assign an initial number, and another to modify the attribute and increment the number by 1.

    I assigned macro #1 to a custom button. Macro #2 is assigned to a shortcut key like CTRL+1, so I could use my left hand for the macro and my right hand to select blocks.

    This process is "manual" but it speeds it up alot.

    If your block has more than one attribute, you'll have to modify macro #2.

    Macro #1 Assign initial number...
    Code:
    ^C^Csetenv;NUMBER1;\
    Macro #2 Modify attribute and increment number varialble...
    Code:
    ^C^C-attedit;y;*;*;*;\;v;r;$M=$(getenv,NUMBER1);n;setenv;NUMBER1;$M=$(+,$(getenv,NUMBER1),1)
    Hope this helps.

  7. #7
    Full Member
    Using
    AutoCAD 2006
    Join Date
    Nov 2009
    Posts
    30

    Default Thanx

    Quote Originally Posted by TigerByTheTail View Post
    You would need to use some advanced LISP to modify the attribute text. I'm using LT (no LISP), so I use 2 macros to modify the attributes...one to assign an initial number, and another to modify the attribute and increment the number by 1.

    I assigned macro #1 to a custom button. Macro #2 is assigned to a shortcut key like CTRL+1, so I could use my left hand for the macro and my right hand to select blocks.

    This process is "manual" but it speeds it up alot.

    If your block has more than one attribute, you'll have to modify macro #2.

    Macro #1 Assign initial number...
    Code:
    ^C^Csetenv;NUMBER1;\
    Macro #2 Modify attribute and increment number varialble...
    Code:
    ^C^C-attedit;y;*;*;*;\;v;r;$M=$(getenv,NUMBER1);n;setenv;NUMBER1;$M=$(+,$(getenv,NUMBER1),1)
    Hope this helps.
    Thanks... I shall definitely give this a try;

  8. #8
    Junior Member TigerByTheTail's Avatar
    Using
    AutoCAD LT 2010
    Join Date
    Aug 2009
    Location
    Eastern Kansas, USA
    Posts
    21

    Default

    You're using AutoCAD 2006, and I have LT 2010. There might be slight variations as to how the command runs in your version. You can check by using -ATTEDIT at the command line and see if all of the options are the same as the macro.

  9. #9
    Forum Deity
    Using
    Civil 3D 2013
    Join Date
    Dec 2005
    Location
    GEELONG AUSTRALIA
    Posts
    3,799

    Default

    You can using lisp or VBA etc easily update your block attributes only one problem if done automatically it will renumber in the order the blocks were created not by location so you could end up with two doors near each other but with say door22 door65 as labels.

    Anyway if you want a block attribute update program just search here under BIGAL I have posted the code a couple of times also check for Leemac he has posted stuff for this before also.

    A hint that may be usefull
    If you want the doors numbered left to right and top to bottom it could be done you make a block list then sort on the insertion point, then update.

    Hint2 use the x,y to get the correct block after step one easier than manipulating two lists. (blockname x,y)

  10. #10
    Senior Member
    Using
    not specified
    Join Date
    Dec 2004
    Location
    YUL
    Posts
    484

    Default

    Registered forum members do not see this ad.


Similar Threads

  1. Numbering in AutoCAD 2007- is there automatic numbering?
    By Heidi1950 in forum AutoCAD General
    Replies: 7
    Last Post: 14th May 2010, 04:19 pm
  2. Page Numbering (i.e. 3 of 27)
    By specialforces27 in forum AutoCAD General
    Replies: 7
    Last Post: 15th May 2007, 12:01 am
  3. Numbering Arrows
    By ebulfin in forum AutoCAD Beginners' Area
    Replies: 13
    Last Post: 28th Jul 2006, 12:56 am
  4. Numbering with a Prefix!
    By clegs in forum AutoLISP, Visual LISP & DCL
    Replies: 0
    Last Post: 18th Jul 2006, 01:33 pm
  5. Numbering system
    By Frankenstein in forum AutoCAD Drawing Management & Output
    Replies: 0
    Last Post: 2nd May 2005, 06:41 pm

Bookmarks

Posting Permissions

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