current folder of the dwg

Discussion in 'AutoCAD' started by matthew_v, Sep 13, 2004.

  1. matthew_v

    matthew_v Guest

    I've found on the net this lisp that sets the output directory for the
    plot file to c:\plots, can you tell me how to modify it in order to
    place the plt in the directory where the dwg currently opened is?

    thanks

    '--Begin Routine--
    Sub ad_PlotToFile()
    On Error Resume Next
    Dim adPlotLayout As AcadLayout
    Dim adFolderName As String
    Dim adResult As Boolean
    adFolderName = "C:\Plots\"
    For Each adPlotLayout In ThisDrawing.Layouts
    If adPlotLayout.Name <> "Model" Then
    ThisDrawing.ActiveLayout = adPlotLayout
    adResult = ThisDrawing.Plot.PlotToFile(adFolderName)
    End If
    Next
    End Sub
    '--End Routine--
     
    matthew_v, Sep 13, 2004
    #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.