How can i set up the viewport in paper space when i use layoff turn off layers and once i move back in model space which the layer it's still on?
Solved! Go to Solution.
The LAYOFF command checks to see if you are working on the Model tab or a Layout tab. If you are working inside a viewport on a Layout tab, the command does not turn layers off, it Viewport-Freezes them.
Oddly, LAYFRZ works the same way.
A way around it would be to add your own command to use in addition to or instead of LAYOFF:
(setq lay (cdr (assoc 8 (entget (car(entsel "\nSelect object on layer to turn off: "))))))
(command "-layer" "off" lay "")
It's not fancy, but it will do the job. Add a loop if you want it to keep asking for more objects/layers.
Both LAYOFF and LAYFRZ have a Settings option (watch that command line): you can turn off the "viewport" effect you describe in the core command, no lisp required. Tap that HELP file and explore more if you wish.