plot to the same directory where the dwg is

Discussion in 'AutoCAD' started by matthew, May 2, 2005.

  1. matthew

    matthew Guest

    Hi, with autocad 2002 I used an autolisp that works no longer with
    autocad 2006: it sets up the plt output directory to be the same as
    the dwg currently opened.
    Can you help me?

    Do you know of any working solution?

    Thanks


    http://new.cadalyst.com/newsline/issue.cfm?issue=200034

    14. TIP: ROUTINES RESET AUTOCAD PATHS TO THE CURRENT DIRECTORY
    Leland Leahy sent in this routine for resetting all paths in AutoCAD
    to
    the current directory:

    (defun e:acadregdialog_set (k$ e$ v$); key entry value
    (vl-registry-write (strcat

    "HKEY_CURRENT_USER\\Software\\Autodesk\\Autocad\\R15.0\\ACAD-1:409\\Profiles\\"

    (getvar "CPROFILE") "\\Dialogs\\" k$) e$
    v$)
    ); end defun

    The following loads every time a drawing opens:

    ;add standard settings below
    (e:acadregdialog_set "OpenSaveAnavDialogs" "InitialDirectory" (getvar
    "DWGPREFIX"))
    (e:acadregdialog_set "Select File" "InitialDirectory" (getvar
    "DWGPREFIX"))
    (e:acadregdialog_set "Create Slide File" "InitialDirectory" (getvar
    "DWGPREFIX"))
    (e:acadregdialog_set "Enter Name Of File To Overlay"
    "InitialDirectory"
    (getvar "DWGPREFIX"))
    (e:acadregdialog_set "ExportLayerStatesFileDialog" "InitialDirectory"
    (getvar "DWGPREFIX"))
    (e:acadregdialog_set "PublishToWeb" "InitialDirectory" (getvar
    "DWGPREFIX"))
    (e:acadregdialog_set "PublishToWebDirectory" "InitialDirectory"
    (getvar
    "DWGPREFIX"))
    (e:acadregdialog_set "Save Drawing As" "InitialDirectory" (getvar
    "DWGPREFIX"))
    (e:acadregdialog_set "Select A File" "InitialDirectory" (getvar
    "DWGPREFIX"))
    (e:acadregdialog_set "SelectDrawingFileBlkDlg" "InitialDirectory"
    (getvar
    "DWGPREFIX"))
     
    matthew, May 2, 2005
    #1
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.