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'~
Code:(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)




Reply With Quote

Bookmarks