I need some help with some drawings im working on- basically a series of blocks with attributes.
I would like to have a lisp script or similar to sequentially number each block attribute automatically… Possible?
Perhaps pm me, cheers!
I need some help with some drawings im working on- basically a series of blocks with attributes.
I would like to have a lisp script or similar to sequentially number each block attribute automatically… Possible?
Perhaps pm me, cheers!
Paging Droz
Nein danke, not an Autocadder nor LISP-er. Could probably do similar/easier in Rhino/Grasshopper though.
Can’t help with this one unfortunately!
Don’t use AutoCAD but can hack LISP
Google says
(defun c:ASQ () :Attribute SeQuential numbering
(princ "
Starting Number: ")
(setq startnum (getint))
(setq num startnum) (princ "
Pick Block to sequentially number: ")
(while (setq a (entsel))
(setq b (car a))
(setq c (entget b))
(setq d (entnext b))
(setq e (entget d))
(setq f (assoc 0 e))
(setq g (assoc 2 e))
(setq h (assoc 1 e))
(setq num$ (itoa num))
(setq hh (cons 1 num$))
(setq e (subst hh h e))
(entmod e) (entupd d)
(setq num (1+ num))
(princ "
Next block: ") ) (princ) )
TC: saw ACAD thread, got excited and thought “fuck yeah, I’m an ACAD pro!” - looked at question, didn’t understand anything, now thinking I’ll just pick a new career.
Thanks guys.
Yeah Zach that is on the right track. I did a bit of a search and found a LISP called ‘mnum’ which does exactly what I need, except I need it to work with prefixes…
same!