AfraLisp Blog

The AutoLisp/Visual Lisp/VBA Resource Website

AfraLisp Blog

Home Newsletter Utter Rubbish Coding Tips AutoCAD Tips Contact Downloads WAUN

Here's a lisp routine for exploding minserted blocks into single blocks and keeping the minsert block pattern?

Heine Munch Nielsen

;CODING STARTS HERE
(defun C:MINX (/ ENT OBS BLK INS CS RS RWS CLS)
(if (setq ENT (entsel "\nSelect minsert: "))
(progn
(command ".undo" "begin")
(setq OBS (entget (car ENT))
BLK (cdr (assoc 2 OBS))
INS (cdr (assoc 10 OBS))
CS (cdr (assoc 44 OBS))
RS (cdr (assoc 45 OBS))
RWS (cdr (assoc 70 OBS))
CLS (cdr (assoc 71 OBS))
)
(command ".insert" ENT "non" INS "" "" "" ".array" "Last" "" "R" CLS RWS RS CS ".erase" ENT "")
(command ".undo" "end")
)
)
)
(princ)
;CODING ENDS HERE

The AutoLisp/Visual Lisp/VBA Resource Website

Copyright 1999-Perpetuity by AfraLisp

All rights reserved.
Information in this document is subject to change without notice.
Site created and maintained by Kenny Ramage

The AutoLisp/Visual Lisp/VBA Resource Website