Jump to content

Get coordinates when zoom extents


shakuhachi

Recommended Posts

How can I get the coordinates of the window when I zoom entents the drawing. It's just like the bounding box written by Lee. I'm layiso-ing some layers and explodes them. When I used "explode" and use all, it explode everything even the layoff layers. Is there a way to do this without exploding the everything. Just the layers which are turn on. If not I'll just have to pick the coordinates of the zoom extents window and explodes the blocks. Thanks.

Link to comment
Share on other sites

I would approach the selection in the following way:

 

(defun SelectAllOn ( / x l )

 (while (setq x (tblnext "LAYER" (null x)))
   (if (minusp (cdr (assoc 62 x)))
     (setq l (cons "," (cons (cdr (assoc 2 x)) l)))
   )
 )
 (ssget "_X" (list '(-4 . "<NOT") (cons 8 (apply 'strcat (cdr l))) '(-4 . "NOT>")))
)

The above will return a SelectionSet of all objects whose layer is On.

Link to comment
Share on other sites

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