@saitoib wrote:
.... I would like to hide all layers except the current layer. .... after the process is finished, I need to restore all the layers to their original state. ....
@ВeekeeCZ , thanks for the reference, but [the original] LIO requires picking something(s). Your modification to isolate the current Layer appears to require that when you want to isolate the Layers of selected things, it is necessary to select them first, unlike virtually any other command, so I don't think I'd go for that approach -- I'd be sure to sometimes put in the command name without pre-selection as I can for other commands, and then the ones I wanted to isolate wouldn't be visible to select [unless the current Layer was one of them].
How about just this?
(defun C:LOABC () ; = Layers Off All But Current
(command "_.layer" "_off" "*" "_no" "")
(princ)
)
Then, a plain old LAYERP command will restore the previous conditions.
[That assumes you haven't upped the setting of the EXPERT System Variable to 1 or more. If you have, and that is your standard setting, omit the "_no".]
Kent Cooper, AIA