明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 1294|回复: 3

关于2008下批打印问题

[复制链接]
发表于 2009-6-4 15:22:00 | 显示全部楼层 |阅读模式
本帖最后由 作者 于 2009-6-4 15:55:29 编辑

以下程序,(2004下可以打印,本人已经验证)2008下只能打一张图纸,F8跟踪时候,第二循环次运行到  ThisDrawing.plot.PlotToDevice时出错,提示PlotToDevice作用错误
 ublic Sub pp()                
 Dim objsel As AcadEntity
 Dim ptLowLeft As Variant
 Dim ptUpRight As Variant
     For Each objsel In ThisDrawing.PaperSpace
       If objsel.ObjectName = "AcDbBlockReference" Then '筛选出Block
          If objsel.Name Like "图框A*" Then                                                    '只选图框块  !!!区分大小写
            objsel.GetBoundingBox ptLowLeft, ptUpRight
                      ReDim Preserve ptLowLeft(1)
                     ReDim Preserve ptUpRight(1)
             ThisDrawing.PaperSpace.Layout.SetWindowToPlot ptLowLeft, ptUpRight
             ThisDrawing.PaperSpace.Layout.PlotType = acWindow
                 PrinterConfigPath = "\\wys\EPSON EPL-2180 Advanced"
                 ThisDrawing.PaperSpace.Layout.PaperUnits = acMillimeters
                   ThisDrawing.PaperSpace.Layout.UseStandardScale = True 
                       ThisDrawing.PaperSpace.Layout.StandardScale = acScaleToFit 

                          ThisDrawing.PaperSpace.Layout.StyleSheet = "au.ctb"
                           ThisDrawing.PaperSpace.Layout.CanonicalMediaName = "A3"
              
                                ThisDrawing.PaperSpace.Layout.PaperUnits = acMillimeters
 
                                       ThisDrawing.plot.NumberOfCopies = 1

                                     ThisDrawing.plot.QuietErrorMode = True

                                           ThisDrawing.plot.PlotToDevice
         End If

   End  if
 Next
 
End Sub

 楼主| 发表于 2009-6-5 08:43:00 | 显示全部楼层
高手呢???
发表于 2009-6-7 21:44:00 | 显示全部楼层

去选项里把 后台打印和发布关掉 看看

 楼主| 发表于 2009-6-8 14:27:00 | 显示全部楼层
高手!!!佩服啊!!!多谢!!!楼上的能说说原因吗?
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|CAD论坛|CAD教程|CAD下载|联系我们|关于明经|明经通道 ( 粤ICP备05003914号 )  
©2000-2023 明经通道 版权所有 本站代码,在未取得本站及作者授权的情况下,不得用于商业用途

GMT+8, 2024-11-26 02:48 , Processed in 0.141175 second(s), 23 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表