| 绘图设备 (.NET) 布局或页面设置的打印设备名称存储在属性中。该名称应与系统上的某个设备匹配,否则将使用默认设备。PlotConfigurationName 您可以使用对象的方法获取 AutoCAD 有权访问的所有可用系统和非系统设备的列表。列出的设备与“打印”(Plot) 或“页面设置”(Page Setup) 对话框中显示的设备相同。GetPlotDeviceListPlotSettingsValidator 列出可用的输出设备此示例列出了可用的输出设备。 VB.NETImports Autodesk.AutoCAD.Runtime
Imports Autodesk.AutoCAD.ApplicationServices
Imports Autodesk.AutoCAD.DatabaseServices
Imports Autodesk.AutoCAD.PlottingServices
' Lists the available plotters (plot configuration [PC3] files)
<CommandMethod("PlotterList")> _
Public Shared Sub PlotterList()
    ' Get the current document and database, and start a transaction
    Dim acDoc As Document = Application.DocumentManager.MdiActiveDocument
    acDoc.Editor.WriteMessage(vbLf & "Plot devices: ")
    For Each plotDevice As String In PlotSettingsValidator.Current.GetPlotDeviceList()
        ' Output the names of the available plotter devices
        acDoc.Editor.WriteMessage(vbLf & "  " & plotDevice)
    Next
End SubC#using Autodesk.AutoCAD.Runtime;
using Autodesk.AutoCAD.ApplicationServices;
using Autodesk.AutoCAD.DatabaseServices;
using Autodesk.AutoCAD.PlottingServices;
// Lists the available plotters (plot configuration [PC3] files)
[CommandMethod("PlotterList")]
public static void PlotterList()
{
    // Get the current document and database, and start a transaction
    Document acDoc = Application.DocumentManager.MdiActiveDocument;
    acDoc.Editor.WriteMessage("\nPlot devices: ");
    foreach (string plotDevice in PlotSettingsValidator.Current.GetPlotDeviceList())
    {
        // Output the names of the available plotter devices
        acDoc.Editor.WriteMessage("\n  " + plotDevice);
    }
}相关概念父主题: | 
 |Archiver|CAD开发者社区
( 苏ICP备2022047690号-1   苏公网安备32011402011833)
|Archiver|CAD开发者社区
( 苏ICP备2022047690号-1   苏公网安备32011402011833)
GMT+8, 2025-10-31 14:08
Powered by Discuz! X3.4
Copyright © 2001-2021, Tencent Cloud.