Dj_T_Rex2002 Posted February 19, 2016 Posted February 19, 2016 Hi Guys, Ok so I have been searching everywhere and even in here and I have not found anything in regards to my issue. I have created blocks with specific layer names. I know I can type VPLAYER then FREEZE then ENTER and SELECT OBJECTS then ENTER again twice in order for the layers to freeze in the view port. Well doing this over and over is pretty tedious. Is there a lisp routine that can be used to do all this functioning by typing lets say LLF [ENTER] and Selecting the objects in the Current View Port to freeze? Thanks in advance. Quote
Dj_T_Rex2002 Posted February 19, 2016 Author Posted February 19, 2016 Ok so I found this, however, it only lets me select a single item. Is there a way to modify it to where I can select multiple objects? (defun c:vlf () (prompt "\nPick entity on the layer you want freeze in this Viewport: ") (setq name (cdr (assoc 8 (entget (car (entsel)))))) (command "_vplayer" "f" name "" "") (princ) ) Thanks in advance. Quote
BIGAL Posted February 19, 2016 Posted February 19, 2016 You can use ssget to select multiple objects and retrieve the object layer names, in a simple version it will execute the vplayer f for a layer multiple times if you pick objects on same layer. (defun c:vlf ( / x layname ss ) (prompt "\nPick entities on the layers you want freeze in this Viewport: ") (setq ss (ssget )) (setq x 0) (repeat (sslength ss) (setq layname (cdr (assoc 8 (entget (ssname ss x)))))) (command "_vplayer" "f" layname "" "") (princ) (setq x (+ x 1)) ) ) 1 Quote
Dj_T_Rex2002 Posted February 22, 2016 Author Posted February 22, 2016 Thanks BIGAL but it gives me the same result as the one above. I am trying to turn off multiple Objects in Multiple layers. When I use the original code or the one you provided, it does it one at a time. It doesn't turn all the layers off, it does it individually. I need for it to do it as a group. 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.