AutoLISP will not completely undo

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I posted earlier and got an answer to my question about changing layer colors with one command.
This is what I've come up with to change the colors of some of the layers:
(defun c:LayCol ()
(command "_.layer" "_color" 8 "*" "")
(command "_.layer" "_color" 5 "E-CKT" "")
(command "_.layer" "_color" 2 "E-RECEPTACLES" "")
(command "_.layer" "_color" 1 "E-CKT-NO" "")
(command "_.layer" "_color" 4 "B-TEXT" "")
(command "_.layer" "_color" 2 "E-LITE-NEW" "")
) ;end function
(princ)
However, I have to hit the undo button multiple times to undo the layer color changes. How can I condense this into one command that will completely undo with one click of the 'undo' button?
I'd like to keep the code as simple as possible, so someone else could come in and add layers as needed.
Thanks