Startapp Explorer Problem

Discussion in 'AutoCAD' started by pashley, Dec 14, 2004.

  1. pashley

    pashley Guest

    I have the commonly used lisp code to open Windows Explorer to the current drawing's directory.

    However, I can't for the life of me get the right syntax for opening to a specific directory - and one that has spaces in the path.

    I can get the following code to run when I paste it into the command line but when I run it from a menu, it won't reproduce the path.

    (startapp "explorer" "\"C:\\Documents and Settings\\All
    Users\\Documents\\PDF Files\\Autosave\"")

    When it runs from the menu all I get on the command line is:

    (startapp "explorer" "

    Any ideas?
     
    pashley, Dec 14, 2004
    #1
  2. pashley

    ECCAD Guest

    For Menus, use the "/" rather than the "\"..e.g.
    (startapp "explorer" "C:/Documents and Settings/All
    Users/Documents/PDF Files/Autosave/")

    On Menus, the \ means pause..

    Bob
     
    ECCAD, Dec 14, 2004
    #2
  3. pashley

    pashley Guest

    Your're right. Looks like there's no way to do this then.
     
    pashley, Dec 14, 2004
    #3
  4. (startapp "explorer \"C:\\Documents and Settings\\All Users\\Documents\\PDF
    Files\\Autosave\"")

    --
    R. Robert Bell


    I have the commonly used lisp code to open Windows Explorer to the current
    drawing's directory.

    However, I can't for the life of me get the right syntax for opening to a
    specific directory - and one that has spaces in the path.

    I can get the following code to run when I paste it into the command line
    but when I run it from a menu, it won't reproduce the path.

    (startapp "explorer" "\"C:\\Documents and Settings\\All
    Users\\Documents\\PDF Files\\Autosave\"")

    When it runs from the menu all I get on the command line is:

    (startapp "explorer" "

    Any ideas?
     
    R. Robert Bell, Dec 14, 2004
    #4
  5. pashley

    pashley Guest

    That code does work within a lisp routine that is called from a menu (which is the way I eventually went). It does not work within a menu because, as was pointed out earlier, the \ is interpreted as a pause. Changing the \ to a / has the menu system interpret the path correctly but the startapp command doesn't like it for some reason - Windows gives me an error saying that there is no such path.

    Thanks for the help.
     
    pashley, Dec 15, 2004
    #5
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.