3dwannab Posted June 14, 2023 Posted June 14, 2023 I was planning on writing a LISP that can unisolate objects that are currently hidden. So basically the hidden objects are temporarily shown to allow the selection of objects to unhide and then hide the objects again. Probably have to run an ssget on all current objects and compare that to the hidden objects along with the selection to unhide in order to get this to work or is there a method to get the hidden o Quote
marko_ribar Posted June 14, 2023 Posted June 14, 2023 Select All with : (setq ss (ssget "_X")) Iterate through sel.set... - if object is hidden it has (60 . 1) in (entget) DXF code list - if object is visible (not hidden) it don't have (assoc 60 (entget ent)), or it has (60 . 0) Regards, M.R. 2 Quote
ronjonp Posted June 14, 2023 Posted June 14, 2023 I think it's code 67 @marko_ribar This should get all hidden items .. also paperspace viewports too. (ssget "_X" '((67 . 1))) 2 Quote
3dwannab Posted July 1, 2023 Author Posted July 1, 2023 (edited) @ronjonp, I found that code 60 works with this scenario. It also seems to get the same results as yours. Code 67 didn't work with this below. Had me scratching my head a little. ;;--------------------------------------------------------------------------- ;; Hides all survey stuff, except for Survey lines, polylines and circles ;; Hides contour lines regardless ;; Written 2023.07.01 by 3dwannab ;;--------------------------------------------------------------------------- (defun C:OO_TS_Lines_Circles_Only (/ ss1 laynames) (setq laynames "TS*") (setq ss1 (ssget "_X" '((-4 . "<or") (-4 . "<and") (8 . "contour") (60 . 0) ;; 0 Object not Hidden, 1 Object Hidden (-4 . "and>") (-4 . "<and") (0 . "~CIRCLE") (0 . "~LINE") (8 . "TS_*") (60 . 0) ;; 0 Object not Hidden, 1 Object Hidden (-4 . "and>") (-4 . "or>") ) ) ) (if ss1 (progn (command "._hideobjects" ss1 "") (prompt (strcat "\nHidden " (itoa (sslength ss1)) " object(s). All " laynames " layers except keeping Survey lines, polylines and circles")) ) (prompt (strcat "\nNo objects found in layers " laynames " or lines and circles to keep...")) ) (princ) ) (princ) (C:OO_TS_Lines_Circles_Only) ;; Only uncomment for testing Edited July 1, 2023 by 3dwannab Quote
Tsuky Posted July 2, 2023 Posted July 2, 2023 An old lisp of 2004. Two command: e_on e_off Isn't the same that the new command : ISOLATEOBJECT E_off-E_on.lsp 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.