这是一个我们不再使用的旧程序的片段(我们现在使用图纸集绘制所有内容)。基本上,它在图形中的所有选项卡中循环,如果名称为“Model”或包含“PDF*”,它将跳过它。代码中没有包含正在使用的变量。希望您能理解其余部分。
- For Each objLayout In ThisDrawing.Layouts
- If objLayout.Name = "Model" Or UCase(objLayout.Name) Like "PDF*" Then
- Debug.Print "Skipping Model Space or PDF tab."
- ElseIf UCase$(objLayout.Name) Like (strTabID & "*") Then
- ThisDrawing.ActiveLayout = ThisDrawing.Layouts(objLayout.Name)
- ThisDrawing.ActiveLayout.RefreshPlotDeviceInfo
- ThisDrawing.ActiveLayout.ViewToPlot = strPlotView
- ThisDrawing.ActiveLayout.PlotType = acView
- ThisDrawing.ActiveLayout.RefreshPlotDeviceInfo
- With ThisDrawing.ActiveLayout
- .RefreshPlotDeviceInfo
- .ConfigName = "PDF-B&W.pc3"
- .CanonicalMediaName = strMediaName
- .StandardScale = ac1_1
- .ScaleLineweights = False
- .StyleSheet = strCTB
- .PlotRotation = ac90degrees
- .ViewToPlot = strPlotView
- .CenterPlot = True
- .PlotType = acView
- End With
- ThisDrawing.Plot.PlotToDevice
- End If
- Next objLayout
|