- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
I'm updating one of my programs to use a system environment variable to set a value in the program:
(setq CadenceVersion (substr (getenv "CDSROOT") 16 5))
This should get me either "16.6" or "17.2" depending on what the CDSROOT env var is set to.
The problem is that while testing, I run the command and it comes back with "17.2". I edit the env vars and change CDSROOT to 16.6 and save it. I try the same command in the LiSP editor again, but I still get "17.2".
I have to exit AutoCAD and re-launch, then reopen the autoLiSP editor and run the command again to get the "16.6" value. If I change the CDSROOT value back to "17.2", it still tells me that it's "16.6" unless I quit and restart again.
Does anyone know of a better way to get the real value of env vars (real time).
Thanks,
Mark
Solved! Go to Solution.