Dag allemaal,
Ik ben al even opzoek naar een manier om automatisch een volgnummer bij een block te krijgen. Ik werk met autocad 2014 LT. Ik heb hiervoor een aantal forums afgezocht en kwam uiteindelijk bij de onderstaande beschrijving:
Here is a way to auto-number using a block.
Create a block with 1 text attribute. This attribute will be the the number that auto-increments.
In this example the block must be named "wire out 2".
Assign this macro to a button:
^C^C_setenv;index1;\_setvar;userr1;\
Assign this macro to a second button:
*^C^C_-insert;"wire out2";\1;;0;$M=$(getenv,index1)$(getvar,userr1);_setvar;userr1;$(+,1,$(getvar,userr1));
When executed, the first macro will ask you for two variables. The first is a prefix that will not increment (i.e. if you want all your numbers to have "room" in front of them [room1, room2, room3...] this is where you type "room". The second variable is the number from which your auto-incrementing will begin.
After you run the first macro, the second macro will insert the block where ever you click. It will keep inserting and auto-numbering with every click until you esc the command. If you don't want the prefix in front of the number it should be easy to edit the 'index1' variable out of these macros.
Volgens mij moet deze macro dus exact doen, waar ik naar opzoek ben. Ik heb deze macro’s dus aangemaakt, en de eerste macro werkt prima. Zodra ik echter de tweede macro start, kan ik wel het block invoegen, maar kom direct het schermpje naar voren om het attribute in te vullen.
Dit moet ik dus precies niet hebben, de macro moet het attribute invullen met telkens een volgnummer.
Dus blok 1, blok 2, blok 3, enz.
Weet iemand een oplossing hiervoor?