ewan_m Posted January 15, 2009 Posted January 15, 2009 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? Quote
profcad Posted January 15, 2009 Posted January 15, 2009 Use SET in DOS SET JUNK=10 Use (getenv "junk") in lisp. Quote
ewan_m Posted January 15, 2009 Author Posted January 15, 2009 I tried that but it returns as nil in autocad Quote
profcad Posted January 15, 2009 Posted January 15, 2009 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. Quote
ewan_m Posted January 15, 2009 Author Posted January 15, 2009 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. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.