|
发表于 2022-7-6 08:12:33
|
显示全部楼层
Only if it's required by your code, that is if it contains any VLISP commands. Any programs which contain only LISP commands will not need this. Still it won't hurt to have it in there if you're in doubt.
Lot's of people set this to install automatically when AutoCAD opens. I prefer low overhead and only load it when needed. And if it's already loaded the system will just ignore it if you call it again so it's pretty safe.
Since this post is about setting system variables with code, and I think it was already mentioned, and in that case I will reiterate, it's a good practice to assign the original setting to some variable to hold for you and when your LISP program has completed, reset them back to their original state. If your programs are used by other people you will soon feel their wrath if your code leaves their pickbox at zero, or osmode to something other than what they are accustomed to using. A good error handling routine is also beneficial so that even if the code crashes or someone hits escape during execution, everything you changed gets set back to it's original value. Just my 2¢ worth. |
|