PDF Filename Dialog Box (Linford)

Discussion in 'AutoCAD' started by dlinford, Dec 3, 2004.

  1. dlinford

    dlinford Guest

    Is there a way to print a PDF and skip the Acrobat File name dialog box?

    Can I do this automatically with Lisp or VBA?

    Thanks,

    David
     
    dlinford, Dec 3, 2004
    #1
  2. dlinford

    Stewart Guest

    I actually do this through my windows printer configuration. I have
    configured my pdf port to be c:plot\*.pdf (makes it easier to find for me)
    and I have also unchecked to option to prompt for file name.
     
    Stewart, Dec 3, 2004
    #2
  3. dlinford

    dlinford Guest

    I have unchecked the option for prompt for file name.

    Now, how do I control the File name & Path.

    David
     
    dlinford, Dec 3, 2004
    #3
  4. dlinford

    Stewart Guest

    That is doine under the PDF port setting on the printer options. You need to
    create a new port pick the pdf port option then point it at

    {yourpath}\*.pdf

    Then it will have the same name as whatever program sends to it. IE if the
    dwg you are working on is called test then the filename will be test model
    (1).pdf , with viewportname replacing model if it is a paperspace viewport.
     
    Stewart, Dec 3, 2004
    #4
  5. dlinford

    dlinford Guest

    Thanks so much for your help Stewart.

    This allows me to plot to a fixed directory. Is there any way to be able to print to a directory & file name specified in a lsp or vba plot routine? And have this directory and/or filename change?

    Thanks again,

    David
     
    dlinford, Dec 3, 2004
    #5
  6. dlinford

    Stewart Guest

    There probably is but I have never gone any further then what you see here
    as usually as I batch plot them if they need to be in the same directory as
    the original I just cut and paste from my plot directory back to the
    original file directory.

    --
    Stewart
    to print to a directory & file name specified in a lsp or vba plot routine?
    And have this directory and/or filename change?
     
    Stewart, Dec 3, 2004
    #6
  7. Where do you find this option - prompt for filename. Mine doesn't appear to
    have it. What 'PDF' printer are you using?

    Casey
     
    Casey Roberts, Dec 3, 2004
    #7
  8. dlinford

    Erich Heiz Guest

    Hi David

    this works in VBA


    Public Sub plotme()

    Dim myFile As String
    Dim currentPlot As AcadPlot
    Dim myLen As Long

    ' Cut the .DWG
    myLen = Len(ThisDrawing.FullName) - 4
    myFile = Left(ThisDrawing.FullName, myLen)
    Set currentPlot = ThisDrawing.Plot
    currentPlot.PlotToFile (myFile)
    Set currentPlot = Nothing

    End Sub

    Erich
     
    Erich Heiz, Dec 13, 2004
    #8
  9. dlinford

    hulioman Guest

    Using it from the command line
    (command "plot" "adobe...
    When you get to the section where it asks to plot to file, type yes. It will create a 0 byte plot file that you can delete, but it will also create the pdf without the dialog prompt.
     
    hulioman, Dec 13, 2004
    #9
  10. dlinford

    The Real JD Guest

    You can disable this option right within Acrobat.

    When you go into your printer options, and the type of PDF file you
    generate, (ebook, web, etc) you can disable the dialog box. it will
    automatically print it to a default folder and assume the name of the file.
    (ie, Drawing1 Layout1.pdf)

    One caveate, is that if you use "." (periods) in your filename, is messes
    up the filenaming that acrobat assigns. Good luck.
     
    The Real JD, Dec 14, 2004
    #10
  11. dlinford

    dlinford Guest

    Erich,

    That routine works great. But I have a problem and I don't know if it is related.

    When I plot to what I think is my PDF plotter it creates PostScript files. I can convert them to PDF later but I am trying to avoid extra steps.

    Thanks,

    David
     
    dlinford, Dec 14, 2004
    #11
  12. dlinford

    Erich Heiz Guest

    Hi David

    sorry for the delayed answer, i was out of town.

    You can use the Adobe PDFcreator as plotter, but there are some quality
    problems with small texts, so we use a postscriptdriver and then convert
    the plt to pdf.

    Use this code to convert automatic after the plot

    Option Explicit ' require variable declarations

    ' Declare a Distiller variable with events enabled
    Dim WithEvents Pdf As PdfDistiller

    '''''

    Set Pdf = New PdfDistiller ' make a new Distiller object
    Pdf.Create ' start the Distiller (so we see startup log messages)
    Pdf.FileToPDF myFile & ".plt", "", ""
    Set Pdf = Nothing
    ''''''

    Erich
     
    Erich Heiz, Dec 19, 2004
    #12
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.