Message 1 of 3
Unable to use the setvar function properly in lisp routine

Not applicable
03-20-2019
11:51 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Please take a look at the code and let me know where does it need modification.
As it is not working the way I intended it to work
what I want to do is
1. get the current layer and store it in a variable
2. set the current layer to "clouds"
3. invoke the "_revcloud" command
4. set the current layer back from the one stored in variable.
any help would be appreciated
(defun c:RC() (setq X (getvar "clayer")) (setvar "clayer" "CLOUDS") (command "_revcloud" "" "NO") (setvar "clayer" X) (princ) )