Here is a basic version of what you want. It does not add the leading zeros however. Study this and read up on lisp in the developers help (\help\acad_dev.chm) and you should be able to modify this to suit your needs.
Code:(defun c:autonum (/ *ms* pt) (vl-load-com) (setq *ms* (vla-get-modelspace (vla-get-activedocument (vlax-get-acad-object)) ) ) (if (not (eq (type autonumi) 'INT)) (setq autonumi 1) ) (while (setq pt (getpoint "\n Select point: ")) (vla-addtext *ms* (rtos autonumi 2 0) (vlax-3d-point pt) (getvar "textsize") ) (setq autonumi (1+ autonumi)) ) )



Reply With Quote


Bookmarks