Getting current plotter name

By Virupaksha Aithal
You can use plot configuration manager “PlotConfigManager” to get the current plotter device used by AutoCAD. Below code shows the procedure.

[CommandMethod("CurrentPlotDevice")]
static public void CurrentPlotDevice()
{
    Document doc = Application.DocumentManager.MdiActiveDocument;
    Editor ed = doc.Editor;
    try
    {
        PlotConfig config = PlotConfigManager.CurrentConfig;
        ed.WriteMessage("Current plot device :"
                                            + config.DeviceName);
    }
    catch 
    {
        ed.WriteMessage("Unable to get the" +
                                    "current plot comfigartionn");
    }
}

Comments

Leave a Reply

Discover more from Autodesk Developer Blog

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

Continue reading