Quantcast
Channel: MicroStation Programming Forum - Recent Threads
Viewing all articles
Browse latest Browse all 7260

[VBA-CE U14] Get active Windows Printer name

$
0
0

Hi,

I am trying to get some information about the active printer.  This routine give me the Print Driver Name, the paper name, and the orientation.  What I am really missing is the Windows Printer Name.

How do I get the Windows Printer Name?  (IE. I can get a result of "Printer.pltcfg", but I also need to get the "HPOfficeJetPro" name from the active Windows printer.)

Sub ActivePrinterSettings()
    Dim Result As String
    CadInputQueue.SendCommand "DIALOG PLOT "
    Result = GetCExpressionValue("plotUI.uiPrinterName")
    Result = Result & vbNewLine & GetCExpressionValue("plotUI.uiPaperName")
    Result = Result & vbNewLine & IIf(GetCExpressionValue("plotUI.uiOrientation") = 0, "Portrait", "Landscape")
    Result = Result & vbNewLine & GetCExpressionValue("plotUI.uiFormSizeX") & ", " & GetCExpressionValue("plotUI.uiFormSizeY")
    MsgBox Result
End Sub

--Thanks,
--Robert Arnold


Viewing all articles
Browse latest Browse all 7260

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>