|
发表于 2006-1-14 22:35:00
|
显示全部楼层
帮你写好了
先设置好默认的打印页面设置
然后 运行下面的程序
Sub DaYin()
Dim a As AcadLayer
For i = 0 To ThisDrawing.Layers.Count - 1
ThisDrawing.Layers.Item(i).LayerOn = False
ThisDrawing.Layers.Item(i).Plottable = False
Next i
ThisDrawing.Layers("公共图层1").LayerOn = True '
For Each a In ThisDrawing.Layers
If a.LayerOn = False Then
a.LayerOn = True
a.Plottable = True
ThisDrawing.Plot.PlotToDevice
If MsgBox("现在正在打印的图层是" + a.Name _
+ ",先不要按确定,等打完了再按." + "如果发现打印格式不对,就按取消", _
vbOKCancel + vbInformation) = vbCancel Then Exit For
a.LayerOn = False
a.Plottable = False
End If
Next a
End Sub
|
|