(defun C:GripLayer ( / *error* Ctab E Layer SS) ;; v1.0 (10-03-03) John F. Uhden ;; Rather than isolate a layer, just select an object, find out ;; how many objects are on the layer (in the current layout/cvport), ;; and grip them so you can see them and/or take action on them ;; (if PICKFIRST is 1). ;; It's best used if you have a wheel mouse and MBUTTONPAN turned on ;; to transparently zoom/pan so that grips stay on. (defun *error* (error) (vla-endundomark *doc*) (cond ((not error)) ((wcmatch (strcase error) "*QUIT*,*CANCEL*")) (1 (princ (strcat "\nERROR: " error))) ) (princ) ) (or *acad* (setq *acad* (vlax-get-acad-object))) (or *doc* (setq *doc* (vla-get-ActiveDocument *acad*))) (vla-endundomark *doc*) (vla-startundomark *doc*) (sssetfirst) (and (if (= (getvar "cvport") 1) (setq Ctab (getvar "ctab")) (setq Ctab "Model") ) (setq E (car (entsel "\nSelect object on desired layer: "))) (setq Layer (cdr (assoc 8 (entget E)))) (setq SS (ssget "X" (list (cons 410 Ctab)(cons 8 Layer)))) (princ (strcat "\nGripped " (itoa (sslength SS)) " objects on layer " Layer " in layout " Ctab)) (sssetfirst nil SS) ) (*error* nil) ) (defun C:GL ()(C:GripLayer))