关于2008下批打印问题
本帖最后由 作者 于 2009-6-4 15:55:29 编辑 <br /><br /> <p>以下程序,(2004下可以打印,本人已经验证)2008下只能打一张图纸,F8跟踪时候,第二循环次运行到 ThisDrawing.plot.PlotToDevice时出错,提示PlotToDevice作用错误<br/> Public Sub pp() <br/> Dim objsel As AcadEntity<br/> Dim ptLowLeft As Variant<br/> Dim ptUpRight As Variant<br/> For Each objsel In ThisDrawing.PaperSpace<br/> If objsel.ObjectName = "AcDbBlockReference" Then '筛选出Block<br/> If objsel.Name Like "图框A*" Then '只选图框块 !!!区分大小写<br/> objsel.GetBoundingBox ptLowLeft, ptUpRight<br/> ReDim Preserve ptLowLeft(1)<br/> ReDim Preserve ptUpRight(1)<br/> ThisDrawing.PaperSpace.Layout.SetWindowToPlot ptLowLeft, ptUpRight<br/> ThisDrawing.PaperSpace.Layout.PlotType = acWindow<br/> PrinterConfigPath = "<a href="file://wys/EPSON">\\wys\EPSON</a> EPL-2180 Advanced"<br/> ThisDrawing.PaperSpace.Layout.PaperUnits = acMillimeters<br/> ThisDrawing.PaperSpace.Layout.UseStandardScale = True <br/> ThisDrawing.PaperSpace.Layout.StandardScale = acScaleToFit </p><p> ThisDrawing.PaperSpace.Layout.StyleSheet = "au.ctb"<br/> ThisDrawing.PaperSpace.Layout.CanonicalMediaName = "A3"<br/> <br/> ThisDrawing.PaperSpace.Layout.PaperUnits = acMillimeters<br/> <br/> ThisDrawing.plot.NumberOfCopies = 1</p><p> ThisDrawing.plot.QuietErrorMode = True</p><p> ThisDrawing.plot.PlotToDevice<br/> End If</p><p> End if<br/> Next<br/> <br/>End Sub</p> 高手呢??? <p>去选项里把 后台打印和发布关掉 看看</p> 高手!!!佩服啊!!!多谢!!!楼上的能说说原因吗?
页:
[1]