Lee Mac 发表于 2022-7-6 15:58:27

 
F9正确

mdemco 发表于 2022-7-6 15:59:25

公共子PDFCurrentBroadcase()
 
'***PDF当前8.5 x 11小册子
 
Dim sSeries As String,Splaname As String,sFoundation As String,sVersion As String
Dim abSeries As String,abFoundation As String
 
将oPlot设置为AcadPlot
 
Dim plotLayouts(0)作为字符串
 
Dim vLayoutList作为变体
Dim sLayout作为字符串
 
Dim layoutsList(0)作为字符串
 
将checkLayout设置为AcadLayout
Dim layoutFoundation作为字符串,layoutSeries作为字符串
将此布局调整为变体
将支票小册子变暗为字符串
 
将MyData设置为数据对象
 
Dim finalPdfPath作为字符串
Dim FinalPDF文件为字符串
将finalPdfPathFile设置为字符串
 
Dim plotFileExt作为字符串
 
Dim tempAcrobatPathFile为字符串
 
将tempPath设置为字符串
 
将纸张尺寸设置为字符串
 
Dim PC3电流作为字符串
 
On Error GoTo ErrorHandler错误处理程序
 
pc3Current=“Adobe PDF.pc3”
 
paperSize=“字母”
 
tempPath=“c:\pdftemp”
 
设置oPlot=ThisDrawing。情节
 
设置MyData=新数据对象
 
plotFileExt=“pdf”
 
finalPdfPath=此图形。路径
finalPdfPath=finalPdfPath+“\手册”
 
tempAcrobatPathFile=tempPath+“\”+此绘图。名称
tempAcrobatPathFile=替换(tempAcrobatPathFile,“dwg”,plotFileExt)
tempAcrobatPathFile=Replace(tempAcrobatPathFile,“9.7”,“9”)“Doug在整行前面加了一个引号”,当我告诉你的时候
 
如果Dir(finalPdfPath,vbDirectory)=“”,则
MkDir最终路径
如果结束
 
sSeries=getDrawingProperty(“currentSeries”)
sPlanName=getDrawingProperty(“propPlanName”)
sFoundation=getDrawingProperty(“currentFoundation”)
sVersion=getDrawingProperty(“propVersion”)
 
abFoundation=getShortName(sFoundation)
abSeries=getShortName(sSeries)
 
对于此图纸中的每个检查布局。布局
 
CheckBroadcase=getLayoutPart(checkLayout.Name,0)
如果选中手册=“Bro”,则
layoutFoundation=getLayoutPart(checkLayout.Name,1)
如果layoutFoundation=abFoundation,则
layoutSeries=getLayoutPart(checkLayout.Name,2)
如果layoutSeries=abSeries,则
plotLayouts(0)=检查布局。名称
检查布局。CanonicalMediaName=GetCanonicalFromLocale(纸张大小,pc3Current)
检查布局。StyleSheet=“小册子.ctb”
检查布局。ConfigName=pc3Current
检查布局。绘图旋转=AC0度
检查布局。PlotType=扩展
退出
如果结束
如果结束
如果结束
下一个
 
如果plotLayouts(0)”,则
 
finalPdfFile=S系列+“-”+SPLANAME+“-”+S基础+“-”+S版本+“-小册子。”+plotFileExt
 
finalPdfPathFile=finalPdfPath+“\”+finalPdfFile
 
如果Dir(finalPdfPathFile,vbDirectory)“,则
终止finalPdfPathFile
如果结束
 
布局列表(0)=CStr(plotLayouts(0))
vLayoutList=布局列表
 
oPlot。SetLayoutsToPlot-vLayoutList
 
oPlot。绘图仪pc3Current
 
While Dir(finalPdfPathFile,vbDirectory)=“”
 
将tempAcrobatPathFile命名为FinalPDPathFile
 
温德
 
如果Dir(tempPath,vbDirectory)=“”,则
MkDir临时路径
ElseIf Dir(tempPath+“\*.pdf”,vbDirectory)”“然后
终止tempPath+“\*.*”
如果结束
如果结束
 
出口接头
 
错误处理程序:
pauseTimer(1)
继续下一步
末端接头
 
 
这就是代码,它最后运行这个“pausetimer”的原因是什么?

mdemco 发表于 2022-7-6 16:05:21

公共子暂停定时器(暂停定时器为单)
 
“***用于在PDF打印期间暂停从c:\pdftemp目录复制文件的计时器”
 
Dim启动为单个
 
开始=计时器设置开始时间。
Do While计时器
DoEvents对其他流程的让步

 
末端接头
 
这是暂停计时器,调试也会在这里进行,它会在Do while计时器行上停止。。。

Lee Mac 发表于 2022-7-6 16:10:28

 
 
一个问题:道格是谁?

Lee Mac 发表于 2022-7-6 16:14:06

为什么不把整个错误处理程序注释掉(去掉计时器),看看是什么错误把你带到了错误处理程序。
 
请原谅我对VBA缺乏经验,但我往往口吃。。。我是说Lisp程序。
页: 1 [2]
查看完整版本: 如何打断Lisp程序?