CAD打印对话框中的“着色视口选项”,如VB如何控制?
CAD打印对话框中的“着色视口选项”,如VB如何控制?如改成“按显示”或“渲染”等? 就是在用VB编写打印程序的时候,一部分图形打印页面布置中,着色视口选项里显示为“渲染”,或“线框”等,有部分内容打印不出来,问如何解决。代码如下:
With AcadApp.ActiveDocument.PaperSpace.Layout
'设置默认打印机类型
.RefreshPlotDeviceInfo
.ConfigName = drivername
'设置图形单位、打印范围和打印区域的比例
.CanonicalMediaName = "A3" 'A3纸
.PaperUnits = acMillimeters'mm为单位
'默认打印方向
.PlotRotation = ac90degrees
'打印样式
.StyleSheet = "acad.ctb"
'设置打印原点
newValue(0) = 4 'Y方向
newValue(1) = 20 'X方向
.PlotOrigin = newValue
'设置打印比例
.StandardScale = ac1_1'比例为1:1
'设置打印范围
.PlotType = acExtents
End With
'******************************************************************************
AcadApp.ActiveDocument.Regen acActiveViewport
'设置打印份数为1
AcadApp.ActiveDocument.Plot.NumberOfCopies = 1
'开始打印
AcadApp.ActiveDocument.Plot.PlotToDevice
许多的AutoCAD新功能都没有再提供属性和方法了,因为COM方式不再是AutoCAD发展的方向 建议使用布局打印出图.
PaperSpace 的 PViewport 子对象的 ShadePlot 属性就是用来设置着色视口选项的.按帮助文件和对象浏览器提供的 AcShadePlot 常数:
acShadePlotAsDisplayed = 0...按显示
acShadePlotWireframe = 1...线框
acShadePlotHidden = 2...消隐
acShadePlotRendered = 3...渲染
但貌似自2006版本以后VBA帮助就没有更新过,以上常量是针对06以前版本的.经尝试,07以后版本是:
0...按显示
1...线框
2...消隐
3...三维隐藏
4...三维线框
5...概念
6...真实
7...渲染
页:
[1]