Jump to content

Recommended Posts

Posted

Hello!

 

For example I have 5 single hidden objects with the command _HideObjects individually.

Now I need as 3 Objekt.Die remaining 4 hidden objects but will remain hidden.

Is there a way individual choice sets that were hidden with the command _HideObjects unhide without all the hidden objects with the command _UnIsolateObjects unhide.

If such a thing would be really great!

 

Best regards Martin

  • 2 weeks later...
Posted

You can use the following vlisp codes instead:

 

Functions:

 

MT:Vanish - to hide objects in selection set:

(defun MT:Vanish (%ss% / n ent)
;; by Mehrdad Ahankhah (Mehre Taban)
(if (and (= 'PICKSET (type %ss%)) (< 0 (setq n (sslength %ss%))))
 (progn
  (princ (strcat "\nGoing to vanish " (itoa n) " objects."))
  (while (> n 0)
   (setq n (1- n))
   (setq ent (entget (ssname %ss% n)))
   (if (assoc 60 ent)
    (setq ent (subst '(60 . 1) (assoc 60 ent) ent))
    (setq ent (append ent '((60 . 1))))
   )
   (entmod ent)
  )
  (princ "\n'Vanish' done successfully.")
 )
 (T (princ "Nothing to vanish."))
)
(princ)
)

 

MT:Unvanish - to unhide objects in selection set:

(defun MT:Unvanish (%ss% / n ent)
;; by Mehrdad Ahankhah (Mehre Taban)
(if (and (= 'PICKSET (type %ss%)) (< 0 (setq n (sslength %ss%))))
 (progn
  (princ (strcat "\nGoing to set visible " (itoa n) " objects."))
  (while (> n 0)
   (setq n (1- n))
   (setq ent (entget (ssname %ss% n)))
   (setq ent (subst '(60 . 0) (assoc 60 ent) ent))
   (entmod ent)
  )
  (princ "\n'Unvanish' done successfully.")
 )
 (progn (alert "Nothing to set visible."))
)
(princ)
)

 

Commands:

 

Vanish or Off - to hide all objects

(defun C:Vanish () (MT:Vanish (ssget)))
(defun C:Off () (C:Vanish))

 

VanishSelected or OffSelected - to hide objects in a selection set and save the selection set with given name

(defun C:VanishSelected (/ name ss)
(setq name (getstring "\nEnter the name of the selection set: "))
(setq ss (ssget))
(set (read (strcat "MehreTaban-" name)) ss)
(MT:Vanish ss)
)
(defun C:OffSelected () (C:VanishSelected))

 

Unvanish or On - to unhide all objects

(defun C:Unvanish () (MT:Unvanish (ssget "x" '((60 . 1)))))
(defun C:On () (C:Unvanish))

 

UnvanishSelected or OnSelected - to unhide objects in a previously saved selection set

(defun C:UnvanishSelected ()
(MT:Unvanish (eval (read (strcat "MehreTaban-" (getstring "\nEnter the name of selection set: ")))))
)
(defun C:OnSelected () (C:UnvanishSelected))

Shazam for CADTutor.LSP

Posted

Thank you for this Lisp. It looks very promising. I will test the same.

Thanks again for the great idea.

Best regards Martin

Posted
Thank you for this Lisp. It looks very promising.

You are welcome.

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