Results 1 to 3 of 3

Thread: VB print to pdf hangs randomly

  1. #1
    Member
    Join Date
    2010-06
    Location
    Guildford, UK
    Posts
    13
    Login to Give a bone
    0

    Default VB print to pdf hangs randomly

    I have a program that prints selected sheets to pdf using the Adobe Acrobat printer, suppressing the user prompt for a filename.

    This mostly works ok but sometimes the program hangs during the acrobat distiller dialog.
    Killing the acrobatray process with taskmanager lets the printing continue.
    This only happens randomly, the same test set of sheets will usually print ok, sometimes not.

    Here is part of the code:

    FileName = OutputName(FolderName, view, ".pdf")
    SetPDFRegistryKey(FileName)
    MyPrintMgr.SubmitPrint(view)

    I am using VB dotnet 2010, Revit architecture 2012 and 2013 on 64 bit Windows 7.

    Anyone else had this and if so have you fixed it?

    Cheers

  2. #2
    Member
    Join Date
    2010-06
    Location
    Guildford, UK
    Posts
    13
    Login to Give a bone
    0

    Default Re: VB print to pdf hangs randomly

    What I am want to do is have a timeout for the .SubmitPrint(view) line.

    I know you can use Process.Start(name) to control an external process from the API but is there something similar that can be used for an API function?

    Failing that I will trap the Windows ESC key as in Jeremy Tammik's recent blog....

    Cheers

  3. #3
    Member
    Join Date
    2010-06
    Location
    Guildford, UK
    Posts
    13
    Login to Give a bone
    0

    Default Re: VB print to pdf hangs randomly

    Finally fixed it!

    Seems that Revit was starting to create the second PDF before the first one was finished. By waiting until the first PDF file existed and then another slight pause after that just to be sure all now works ok!

Similar Threads

  1. “Help” Randomly Executes
    By dawn.pedersen309807 in forum AutoCAD Civil 3D - General
    Replies: 4
    Last Post: 2013-01-16, 04:45 PM
  2. View randomly jumping around
    By schrodingerscat in forum Revit - Platform
    Replies: 7
    Last Post: 2008-09-30, 12:05 AM
  3. CAD Hangs up
    By michael105936 in forum Hardware
    Replies: 4
    Last Post: 2008-09-29, 03:08 PM
  4. Font Disappearing Randomly
    By philA in forum AutoCAD Annotation
    Replies: 1
    Last Post: 2008-06-13, 10:59 PM
  5. Settings Randomly Changing
    By bbambu in forum AMEP General
    Replies: 6
    Last Post: 2006-10-27, 04:22 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •