Auto Number and add prefix to blocks attributes

Auto Number and add prefix to blocks attributes

Anonymous
Not applicable
4,162 Views
2 Replies
Message 1 of 3

Auto Number and add prefix to blocks attributes

Anonymous
Not applicable

I used to have a LISP routine called something like "Autonum."

I no longer have it, but it helped me quite a bit.

I have searched everywhere online to find it again, but have had no luck.

 

Example:

If I had attribute text that said the following:

NP-131, NP-145, NP-67

 

And I needed it to read:

NP-1, NP-2, NP-3

 

With that LISP routine I used to have, I could type in a prefix (in this case it would be NP-) and then select an increment of number to increase (I would set it to 1). I would then select the each attribute text that I wanted to change to that order.

 

Does anyone know of such a LISP routine??

 

Thanks

 

See screenshot attached

 

 

 

 

 

 

 

0 Likes
Accepted solutions (1)
4,163 Views
2 Replies
Replies (2)
Message 2 of 3

_gile
Consultant
Consultant

Hi,

 

This is not LISP, but the Increment plugin on the App Store does what you need and some more.

 

If you absolutely want a LISP solution, you can try Increment.lsp (INCSUF or INCSEL commands) but prompts and comments are in French.

 

It also seems to me Lee Mac have written a nice routine (search here).



Gilles Chanteau
Programmation AutoCAD LISP/.NET
GileCAD
GitHub

Message 3 of 3

Anonymous
Not applicable
Accepted solution

The routine that @_gile expos is: