Check for 'type' of AutoCAD

Discussion in 'AutoCAD' started by ECCAD, Nov 28, 2004.

  1. ECCAD

    ECCAD Guest

    What is the best way to check for the 'type' of AutoCAD, on startup ? I'm trying to find a way in Lisp, on startup, to detect if AutoCAD 2004, or AutoCAD Map, or AutoCAD LDD is starting. The system variable 'ACADVER' doesn't tell me which I have.
    Thanks.

    Bob
     
    ECCAD, Nov 28, 2004
    #1
  2. Does this help?

    (vlax-product-key)


    I also vaguely remember someone mentioning here
    that checking for specific arx apps being loaded is
    another way to determine it, but I don't recall all of
    the details.

    --
    Autodesk Discussion Group Facilitator


    AutoCAD 2004, or AutoCAD Map, or AutoCAD LDD is starting. The system variable 'ACADVER' doesn't tell me which I have.
     
    Jason Piercey, Nov 28, 2004
    #2
  3. ECCAD

    Alaspher Guest

    You can try:
    Code:
    (setq capt (vla-get-Caption (vlax-get-acad-object)))
    ;;; then if or cond
    (if (wcmatch capt "*Map*")
    ...
    )
    (if (wcmatch capt "*Land*")
    ...
    )
    but it isn't guaranty.

    regards
     
    Alaspher, Nov 28, 2004
    #3
  4. ECCAD

    ECCAD Guest

    Jason,
    Thanks.

    No, not what I need. I get.
    Command: (vl-load-com)
    Command: (setq product (vlax-product-key))
    "Software\\Autodesk\\AutoCAD\\R15.0\\ACAD-1:409"

    I'll try the:
    (setq capt (vla-get-Caption (vlax-get-acad-object)))
    and see what I get there..

    Command: (setq capt (vla-get-Caption (vlax-get-acad-object)))
    "AutoCAD 2002 - [Drawing1.dwg]"
    .............
    I can work with that.

    Thanks,
    Bob
     
    ECCAD, Nov 28, 2004
    #4
  5. How about something like this

    (vl-registry-read
    (strcat "HKEY_LOCAL_MACHINE\\" (vlax-product-key))
    "ProductName")
     
    Jason Piercey, Nov 28, 2004
    #5
  6. ECCAD

    ECCAD Guest

    Jason,
    Thanks. I get:

    Command: (vl-registry-read (strcat "HKEY_LOCAL_MACHINE\\" (vlax-product-key))
    "ProductName")
    "AutoCAD 2002"

    This should also do what I wanted.
    Thanks again.

    Bob
     
    ECCAD, Nov 28, 2004
    #6
  7. ECCAD

    Rakesh Rao Guest

    Hello,

    Yet another method I have been using the following code to detect
    Autodesk Map and Land Desktop and it has worked fine so far.

    ;;-------------------------------
    (if (member "ade.arx" (arx))
    (setq #AcadMap T)
    (setq #AcadMap nil)
    )

    (if (member "aeccapp.arx" (arx))
    (setq #LandDeskTop T)
    (setq #LandDeskTop nil)
    )
    ;;-------------------------------

    Regards
    Rakesh

    --
    --
    - Rakesh Rao [ rakesh.rao (at)4d-technologies.com ]
    - Four Dimension Technologies
    [www.4d-technologies.com]
    - Get GeoTools, Work smarter: www.4d-technologies.com/geotools
    - Free Lisp downloads @ TechCenter: www.4d-technologies.com/techcenter
     
    Rakesh Rao, Nov 29, 2004
    #7
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.