Getting all available plotter names

By Virupaksha Aithal
You can use plot configuration manager “PlotConfigManager” to get all the plotter devices available for AutoCAD. “PlotConfigManager” has a property called “Devices”, which provides the access to all the devices.  Below code shows the procedure.

[CommandMethod("ListPlotDevices")]
static public void ListPlotDevices()
{
    Document doc = Application.DocumentManager.MdiActiveDocument;
    Editor ed = doc.Editor;
 
    PlotConfigInfoCollection devices = PlotConfigManager.Devices;
    foreach(PlotConfigInfo info in devices)
    {
        ed.WriteMessage(info.DeviceName + "n");
    }
}

Comments

Leave a Reply

Discover more from Autodesk Developer Blog

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

Continue reading