
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
I'm currently trying to write what I think would be a very simple lisp routine. Typically, my OFFSETGAPTYPE system variable is set to 0. On occasion I want to show a buffer around an object which is better shown by changing OFFSETGAPTYPE to 1 and then using the OFFSET command.
I'd like to write a routine called BUFFER that will change OFFSETGAPTYPE to 1, allow me to run the OFFSET command, then change OFFSETGAPTYPE back to 0. Below is what I have at the moment. The script is changing the variable to 1, allowing me to offset whichever objects but after I hit enter to end the offset command it doesn't change the variable back to 0. In other words, it appears that anything after the offset command isn't being executed.
(defun c:buffer()
(setvar "offsetgaptype" 1)
(command "offset")
(setvar "offsetgaptype" 0)
(princ)
)
Any help is greatly appreciated!
Solved! Go to Solution.