.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

listing printers

3 REPLIES 3
SOLVED
Reply
Message 1 of 4
Anonymous
478 Views, 3 Replies

listing printers

Good morning, I am trying to list the printers that are installed on my PC and tabem the plot style table (pen assignments), each in a popup_list, I have done the dialog box, just missing the lisp someone could give me an idea of how do.

 

thank you.

3 REPLIES 3
Message 2 of 4
SENL1362
in reply to: Anonymous

requesting the LISP?
Message 3 of 4
SENL1362
in reply to: SENL1362

as a .NET solution this might help you:

using Autodesk.AutoCAD.PlottingServices;
...

 

        [CommandMethod("LPC3")]
        public void ListPC3()
        {
            Document doc = Application.DocumentManager.MdiActiveDocument;
            Database db = doc.Database;
            Editor ed = doc.Editor;

            PlotConfigManager.RefreshList(RefreshCode.All);
            PlotSettingsValidator plotSettingsValidator = PlotSettingsValidator.Current;

            try
            {
                var PlotDeviceList = plotSettingsValidator.GetPlotDeviceList().Cast<string>().ToList();
                PlotDeviceList.ForEach(p =>  ed.WriteMessage("\n\t{0}", p));

...
var plotStyleList = plotSettingsValidator.GetPlotStyleSheetList()
.Cast<string>()
.Select(ctb => ctb.EndsWith(".ctb"))
.ToList();


...

 

Message 4 of 4
Anonymous
in reply to: Anonymous

thanks a lot

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost