Use SET in DOS SET JUNK=10
Use (getenv "junk") in lisp.
Registered forum members do not see this ad.
Hi Everyone,
I am using windows XP with Autocad map 2006 and have been trying to get some batching from DOS running scripts and autolisp batches in autocad with certain variables set.
I remember in the past seeing variables being set in dos and then having them available in autocad, i have tried "SET XXX= TEST" etc. in dos but autocad doesn't seem to take them up.
Does anyone know how to get dos variables into autocad so autolisp can work appropriately?
Use SET in DOS SET JUNK=10
Use (getenv "junk") in lisp.
John Helton
Professor of CAD
Oklahoma City Community College
Oklahoma City, OK
I tried that but it returns as nil in autocad
Here is another way.
Right Click on your Computer Icon (windows desktop) select Properties and then select the advance tab. Click on Environment Variables and add the variables there.
John Helton
Professor of CAD
Oklahoma City Community College
Oklahoma City, OK
Registered forum members do not see this ad.
After some more fiddling i found the solution (or so it seems for me):
You must call autocad from the command prompt where you set the variable. I thought if you called autocad after it was set that would be enough - I was wrong.
Bookmarks