+ Reply to Thread
Results 1 to 4 of 4

Thread: _HideObjects

  1. #1
    Full Member martinle's Avatar
    Computer Details
    martinle's Computer Details
    Operating System:
    windows 7
    Using
    AutoCAD 2012
    Join Date
    Mar 2010
    Location
    Austria
    Posts
    67

    Default _HideObjects

    Registered forum members do not see this ad.

    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
    My friend has the Google Translator

  2. #2
    Senior Member Ahankhah's Avatar
    Computer Details
    Ahankhah's Computer Details
    Operating System:
    Windows XP
    Using
    AutoCAD 2012
    Join Date
    Jun 2010
    Location
    Tehran, Iran
    Posts
    430

    Default Shazammmmmmmmmm

    You can use the following vlisp codes instead:

    Functions:

    MT:Vanish - to hide objects in selection set:
    Code:
    (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:
    Code:
    (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
    Code:
    (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
    Code:
    (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
    Code:
    (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
    Code:
    (defun C:UnvanishSelected ()
     (MT:Unvanish (eval (read (strcat "MehreTaban-" (getstring "\nEnter the name of selection set: ")))))
    )
    (defun C:OnSelected () (C:UnvanishSelected))
    Attached Files
    Mehrdad Ahankhah مهرداد آهن خواه
    www.IranCAD.com

  3. #3
    Full Member martinle's Avatar
    Computer Details
    martinle's Computer Details
    Operating System:
    windows 7
    Using
    AutoCAD 2012
    Join Date
    Mar 2010
    Location
    Austria
    Posts
    67

    Default

    Thank you for this Lisp. It looks very promising. I will test the same.
    Thanks again for the great idea.
    Best regards Martin
    My friend has the Google Translator

  4. #4
    Senior Member Ahankhah's Avatar
    Computer Details
    Ahankhah's Computer Details
    Operating System:
    Windows XP
    Using
    AutoCAD 2012
    Join Date
    Jun 2010
    Location
    Tehran, Iran
    Posts
    430

    Default

    Registered forum members do not see this ad.

    Quote Originally Posted by martinle View Post
    Thank you for this Lisp. It looks very promising.
    You are welcome.
    Mehrdad Ahankhah مهرداد آهن خواه
    www.IranCAD.com

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts