Enumerate plotters in ActiveX

<?xml encoding=”UTF-8″>By Xiaodong Liang

The following VBA function enumerates all plotters that have corresponding .pc3 files, you can use this in your VBA applications:

Public Function GetPlotters() As Collection<br>Set GetPlotters = New Collection<br>Dim strPlotter As String<br>strPlotter = Dir(Application.Preferences.Files.PrinterConfigPath + "*.pc3")<br>While Not strPlotter = ""<br>   GetPlotters.Add strPlotter<br>   strPlotter = Dir<br>   MsgBox strPlotter<br>Wend<br>End Function

A method to enumerate system printers (these are also available in the plot dialog of AutoCAD) is available on the following Microsoft knowledge base article:

http://support.microsoft.com/kb/166008


Comments

Leave a Reply

Discover more from Autodesk Developer Blog

Subscribe now to keep reading and get access to the full archive.

Continue reading