+ Reply to Thread
Results 1 to 5 of 5
  1. #1
    Junior Member
    Using
    Map 3D 2006
    Join Date
    Jan 2009
    Posts
    22

    Default Windows variables in AutoCad

    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?

  2. #2
    Super Member profcad's Avatar
    Computer Details
    profcad's Computer Details
    Operating System:
    Windows 7 Ultimate
    Computer:
    Dell
    CPU:
    Dual - Six-Core Xeon
    RAM:
    12GB
    Graphics:
    NVida 4400
    Monitor:
    DUAL 24" WIDESCREEN
    Discipline
    Education
    profcad's Discipline Details
    Occupation
    Professor Of CAD
    Discipline
    Education
    Using
    Revit 2014
    Join Date
    Dec 2005
    Location
    Oklahoma City, OK
    Posts
    829

    Default

    Use SET in DOS SET JUNK=10

    Use (getenv "junk") in lisp.
    John Helton
    Professor of CAD
    Oklahoma City Community College
    Oklahoma City, OK

  3. #3
    Junior Member
    Using
    Map 3D 2006
    Join Date
    Jan 2009
    Posts
    22

    Default

    I tried that but it returns as nil in autocad

  4. #4
    Super Member profcad's Avatar
    Computer Details
    profcad's Computer Details
    Operating System:
    Windows 7 Ultimate
    Computer:
    Dell
    CPU:
    Dual - Six-Core Xeon
    RAM:
    12GB
    Graphics:
    NVida 4400
    Monitor:
    DUAL 24" WIDESCREEN
    Discipline
    Education
    profcad's Discipline Details
    Occupation
    Professor Of CAD
    Discipline
    Education
    Using
    Revit 2014
    Join Date
    Dec 2005
    Location
    Oklahoma City, OK
    Posts
    829

    Default

    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

  5. #5
    Junior Member
    Using
    Map 3D 2006
    Join Date
    Jan 2009
    Posts
    22

    Default

    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.

Similar Threads

  1. Useful system variables for autocad 2008/9!
    By papagyi in forum Tutorials & Tips'n'Tricks
    Replies: 6
    Last Post: 15th Sep 2008, 03:44 pm
  2. Replies: 0
    Last Post: 28th Jul 2008, 07:30 pm
  3. Replies: 0
    Last Post: 28th Jul 2008, 01:00 am
  4. Variables in AutoCAD Lt 2006?
    By roger-k in forum AutoCAD Drawing Management & Output
    Replies: 9
    Last Post: 27th Nov 2006, 02:50 pm
  5. AutoDraw within AutoCAD from variables/values from Excel
    By Jedidia in forum AutoCAD General
    Replies: 2
    Last Post: 24th Jun 2005, 02:12 pm

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts