Monitoring the print queue using VB.NET

  1. I am tryitrying to monitor the print queue in VB.NET. All I want to know is if someone is using Microstation to print a PDF document. I want the file name.
  2. I have already created a software to monitor the activity of all the print drivers in Windows. It looks like Microstation is not using a print driver installed on Windows, because my software doesn't provide an output when Microstation is printing a file. My software gives an output when MS Word is printing file.
  3. To make it clear, I want to know when Microstation is printing a file. And I want the full file name too. My current software works for other software like MS Word except for Microstation.
  4. Please help me. It's my first time posting here. Sorry if this is informal.
Parents
  • Hi Lasindu,

    It's my first time posting here. Sorry if this is informa

    It's fine, but I recommend to move your post to MicroStation Programming forum, because it's about VB.NET (it's true it's somewhere between MicroStation and general programming, but it's still about programming ;-). To move existing post, use More > Move tool under your original post.

    Also, read best practices that defines what information should be shared plus other recommendations that helps to streamline communication and make the discussion more efficient. At least to specify MicroStation version exactly (e.g. CONNECT Edition Update 13) is necessary, and because it's about Windows printing, to know Windows version can also help.

    It looks like Microstation is not using a print driver installed on Windows

    It depends how MicroStation is configured:

    • MicroStation uses Windows printers when printer.pltcfg is used. In such case, MicroStation behaves as normal Windows application.
    • Historically MicroStation allows to use also own printer drivers (concept coming from times where Windows were not able to print any engineering drawing correctly, because there was no API and support). In this case, MicroStation uses own engine to create and provide desired format.
    All I want to know is if someone is using Microstation to print a PDF document.

    What driver do you use to produce PDF file. For long time Windows did not provide any PDF printer. Now it's possible to use very basic Microsoft Print to PDF driver or alternatives like Bullzip PDF printer and others.

    But MicroStation itself contains better (because optimized for MicroStation) PDF printer (pdf.pltcfg), based on Adobe libraries and independent from Windows.

    To make it clear, I want to know when Microstation is printing a file.

    When Windows driver will be used (printer.pltcfg), you monitoring application should be able to handle such event.

    When other pltcfg file (HPGL, HPRT, SVG, PDF...) is used, Windows (and you software as well) do not know about the printing process. For this scenario, you have to develop monitoring application directly for MicroStation and to ensure MicroStation will load this application automatically when it starts.

    With regards,

      Jan

    Answer Verified By: Lasindu Weerasinghe 

  • Thank you so much for the support.

    Print To PDF can be used, but the user doesn't know how to change the printer driver to an installed printer driver. I Googled it, but still I can't see how. I will move the question but if you can answer that problem, everything will be solved

    Windows 10

    I don't know the Microstation version name, he is said it's the latest version. All I have is MicrostationGDN COM object.

    Thank you again.

  • Hi Lasindu,

    Print To PDF can be used, but the user doesn't know how to change the printer driver to an installed printer driver

    It's not quite clear what the situation is and what should be changed to what.

    To use Windows driver, printer.pltcfg driver should be selected. In current MicroStation CONNECT Edition, it's even not required to remember it's printer.pltcfg, because in the list, it's just called Windows printer. Also, all Windows printers should be available in the same list also.

    To use MicroStation PDF printer driver (which allows e.g. to maintain level structure or to print to 3D PDF), pdf.pltcfg driver should be used.

    I don't know the Microstation version name, he is said it's the latest version.

    The version is crucial, because V8i was 32bit, whereas CE is 64bit, so when it's access from external process (e.g. using COM/Interop), the application has to follow bits and to use proper Interop assembly.

    All I have is MicrostationGDN COM object.

    I am not quite sure, because I do not use MicroStation Interop API too often, but in latest versions, IPrintEvents object should be available to monitor printing events. See MicroStation VBA help for further details.

    Regards,

      Jan

Reply Children
No Data