tzframpton Posted April 5, 2007 Posted April 5, 2007 Anyone have a Lisp routine of a keynote (circle keynote prefereably) with an attribute that when you copy it, it numbers automatically? i have to number HVAC grille locations per Unit, and so i have a lot of "repeating" keynotes. it just has to start from one and go up until i stop the routine, and start back from one when i restart the routine. Anyone have anything like this laying around in a dusty corner of your hard drive?? Thanks in advance..... Quote
fixo Posted April 5, 2007 Posted April 5, 2007 Play around this one There is not exactly what you need but may helps Change a keynote block name and tag to your suit ~'J'~ (defun c:ibl (/ atd blk cnt ech ipt next next_data osm tag) (setq osm (getvar "osmode")) (setq ech (getvar "cmdecho")) (setq atd (getvar "attdia")) (setvar "osmode" 0) (setvar "cmdecho" 0) (setvar "attdia" 1) (setq cnt (getint "\nEnter first number: ")) (if cnt (progn ;(setq tag (strcase (getstring "\nEnter attribute tag for numbering: "))) (setq tag "SEQ");change attribute tag "SEQ" to your suit (while (setq ipt (getpoint "\nPick insertion point")) (command "-insert" "ONE" ipt 1 1 0);<- change block name "ONE" here (setq blk (entlast)) (setq next blk) (while (setq next (entnext next)) (setq next_data (entget next)) (if (= tag (cdr (assoc 2 next_data))) (progn (entmod (subst (cons 1 (itoa cnt)) (assoc 1 next_data) next_data)) (entupd blk) ) ) ) (setq cnt (1+ cnt)) ) ) ) (setvar "osmode" osm) (setvar "attdia" atd) (setvar "cmdecho" ech) (prin1) ) (prompt "\ntype iBL to execute ...") (prin1) ;;;TesT : (c:ibl) Quote
VVA Posted April 5, 2007 Posted April 5, 2007 Look here http://www.cadtutor.net/forum/showthread.php?t=11114 Quote
tzframpton Posted April 5, 2007 Author Posted April 5, 2007 Fatty, you are the friggin' MAN. awesome dude, thanks... worked PERFECT. EDIT: VVA, thanks for the links, i'll check those out too. but Fatty made exactly what i was looking for. :wink: Quote
Amuthan Posted August 5, 2013 Posted August 5, 2013 Hi, I tried to run this script.. Here's what AutoCAD does: 1. Asks my input for Start of Sequence number. 2. Inserts the block 3. The attribute dialog pops up 4. I re-enter the sequence number there 5. The block gets the attribute 6. Click on empty space and it begins from step 1. Although, I was able to achieve what I wanted to I was wondering if there was anyway to make this work. I am working on AutoCAD 2013 just in case that matters. Quote
stevsmith Posted August 5, 2013 Posted August 5, 2013 (edited) I know fatty gave you what you needed but I remember Lee used to have a cracker of an Incremental numbering lisp. http://www.lee-mac.com/numinc.html (It looks a little more advanced now than what i remember when he first wrote it) I've just noticed this post is several years old. Sorry Edited August 5, 2013 by stevsmith Made an ass of myself not noticing the date. Quote
Amuthan Posted August 6, 2013 Posted August 6, 2013 Steve and LeeMac Thanks for your input guys. This was what I was looking for! I just hope this works fine with my version of AutoCAD! Much appreciate the quick replies! I know fatty gave you what you needed but I remember Lee used to have a cracker of an Incremental numbering lisp. http://www.lee-mac.com/numinc.html (It looks a little more advanced now than what i remember when he first wrote it) I've just noticed this post is several years old. Sorry Quote
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.