leonucadomi Posted August 19, 2021 Posted August 19, 2021 Hello : someone knows what happens with my routine that does not explode the selection in window? I want to exploit the blocks between a certain area and I can not (defun c:pru (/) (setq ss (ssget "_C" '(302681 -315028) '(309429 -317736.5) '((0 . "INSERT")))) (command "_explode" ss "") );fin defun pru.dwg pru.lsp Quote
Lee Mac Posted August 19, 2021 Posted August 19, 2021 A couple of possible reasons: Graphical selection methods require the objects to be visible within the drawing area in order to be selected. The EXPLODE command will only operate on selection sets if QAFLAGS bit 1 is enabled. Hence, the code might become something along the lines of: (defun c:pru ( / pt1 pt2 qaf sel ) (setq pt1 '(302681.0 -315028.0) pt2 '(309429.0 -317736.5) ) (command "_.zoom" "_w" "_non" pt1 "_non" pt2) (if (setq sel (ssget "_C" pt1 pt2 '((0 . "INSERT")))) (progn (setq qaf (getvar 'qaflags)) (setvar 'qaflags (logior 1 qaf)) (command "_.explode" sel "") (setvar 'qaflags qaf) ) ) (command "_.zoom" "_p") (princ) ) Quote
leonucadomi Posted August 19, 2021 Author Posted August 19, 2021 wow excellent master ...Thanks Quote
devitg Posted August 19, 2021 Posted August 19, 2021 (edited) 10 hours ago, leonucadomi said: Hello : someone knows what happens with my routine that does not explode the selection in window? I want to exploit the blocks between a certain area and I can not (defun c:pru (/) (setq ss (ssget "_C" '(302681 -315028) '(309429 -317736.5) '((0 . "INSERT")))) (command "_explode" ss "") );fin defun pru.dwg 132.51 kB · 2 downloads pru.lsp 153 B · 2 downloads erased Edited August 19, 2021 by devitg wrong post 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.