iconeo Posted June 16, 2011 Posted June 16, 2011 Hello all long time lurker here but I don't post much. I am trying to write a lisp that zooms to extents, selects all and then deselects everything within the extents. I need to do this since I'm working on some dirty files with a bunch of hideen junk that I need to purge out. I've got the lisp to zoom to extents and selecting all part down and I'm stuck on the deselecting everything in the extents of the drawing part. Thanks in advance. Quote
SOliver Posted June 16, 2011 Posted June 16, 2011 Not sure if I understand this: Why not select the objects you don't want (ssget "CP", "WP") or something similar and then have the lisp select everything not in the sset? Alternatively apply the above in reverse. Although I can't understand why you'd select and then deselect everything. The result would be the same as doin' nothing (other than the zoom extents) Quote
Tharwat Posted June 16, 2011 Posted June 16, 2011 I guess the command Zoom extents does not require to select any object . ! You may mean Zoom -> Object ? Quote
Lee Mac Posted June 16, 2011 Posted June 16, 2011 Would this work for you? (defun c:test ( / s1 ) (if (setq s1 (ssget "_X" (list (cons 410 (getvar 'CTAB))))) (command "_.select" s1 "_remove" (ssget "_W" (getvar 'EXTMIN) (getvar 'EXTMAX) (list (cons 410 (getvar 'CTAB)))) "" ) ) ) 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.