ottoatom Posted July 16, 2007 Share Posted July 16, 2007 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!! Quote Link to comment Share on other sites More sharing options...
ascen707 Posted July 16, 2007 Share Posted July 16, 2007 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. Quote Link to comment Share on other sites More sharing options...
ottoatom Posted July 16, 2007 Author Share Posted July 16, 2007 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.. Quote Link to comment Share on other sites More sharing options...
ascen707 Posted July 16, 2007 Share Posted July 16, 2007 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! numbering.zip Quote Link to comment Share on other sites More sharing options...
NHM Posted November 12, 2009 Share Posted November 12, 2009 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!!! Quote Link to comment Share on other sites More sharing options...
TigerByTheTail Posted November 15, 2009 Share Posted November 15, 2009 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... ^C^Csetenv;NUMBER1;\ Macro #2 Modify attribute and increment number varialble... ^C^C-attedit;y;*;*;*;\;v;r;$M=$(getenv,NUMBER1);n;setenv;NUMBER1;$M=$(+,$(getenv,NUMBER1),1) Hope this helps. Quote Link to comment Share on other sites More sharing options...
NHM Posted November 16, 2009 Share Posted November 16, 2009 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... ^C^Csetenv;NUMBER1;\ Macro #2 Modify attribute and increment number varialble... ^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; Quote Link to comment Share on other sites More sharing options...
TigerByTheTail Posted November 16, 2009 Share Posted November 16, 2009 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. Quote Link to comment Share on other sites More sharing options...
BIGAL Posted November 17, 2009 Share Posted November 17, 2009 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) Quote Link to comment Share on other sites More sharing options...
paulmcz Posted February 22, 2010 Share Posted February 22, 2010 See here: http://www.cadtutor.net/forum/showthread.php?p=305092&posted=1#post305092 Quote Link to comment Share on other sites More sharing options...
guitarchitect Posted November 12, 2012 Share Posted November 12, 2012 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... ^C^Csetenv;NUMBER1;\ Macro #2 Modify attribute and increment number varialble... ^C^C-attedit;y;*;*;*;\;v;r;$M=$(getenv,NUMBER1);n;setenv;NUMBER1;$M=$(+,$(getenv,NUMBER1),1) Hope this helps. I realize this is a really old post, but can someone help with this? I am using Autocad Architecture 2012 and I am often numbering parking spaces... this kind of macro would be awesome. I can't seem to get it to work, do getenv and setenv work in non-LT autocad and if not how can I modify this macro? I'm currently using it as the "command" in a "run script" tool/icon Quote Link to comment Share on other sites More sharing options...
TigerByTheTail Posted November 12, 2012 Share Posted November 12, 2012 I'm not familiar with Architectural 2012. Check for getenv and setenv in your help file. If those are valid commands, check the prompts when you enter -ATTEDIT at the command line (include the "-"). If you can send me an 2010 version of your parking space block, I'll see if I can help. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.