Jump to content

Recommended Posts

Posted

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

Posted

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)
)

 

 

Posted

wow excellent master ...Thanks

Posted (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 by devitg
wrong post

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...