houlinbo 发表于 2005-2-24 12:03:00

VBA中范围打印命令是什么?

VBA中有显示打印、根据图纸大小打印等,VBA中范围打印命令是什么?

PS122 发表于 2005-2-24 12:40:00

<P class=syntax>object.SetWindowToPlot(LowerLeft, UpperRight)
<P class=element>Object


<P class=element-desc><A href="mk:@MSITStore:D:\AutoCAD%202005\help\acadauto.chm::/idh_layout_object.htm" target="_blank" >Layout</A>, <A href="mk:@MSITStore:D:\AutoCAD%202005\help\acadauto.chm::/idh_plotconfiguration_object.htm" target="_blank" >PlotConfiguration</A><BR>The object or objects this method applies to.
<P class=element>LowerLeft


<P class=element-desc>Variant (two-element array of doubles); input-only<BR>The X and Y values for the lower-left window.
<P class=element>UpperRight


<P class=element-desc>Variant (two-element array of doubles); input-only<BR>The X and Y values for the upper-right window.

houlinbo 发表于 2005-2-24 20:54:00

可以加上注释吗?

houlinbo 发表于 2005-2-24 20:56:00

Private Sub CommandButton1_Click()<BR>ThisDrawing.PaperSpace.Layout.ConfigName = "hp laserjet 1000"<BR>' 到布局<BR>        If ThisDrawing.ActiveSpace = acModelSpace Then<BR>        ThisDrawing.ActiveSpace = acPaperSpace<BR>       ThisDrawing.MSpace = False<BR>ZoomExtents<BR>        End If


<BR>'打印落在选定空间内的全部内容<BR>ThisDrawing.PaperSpace.Layout.PlotType = acExtents


<BR>'设计为草图打印,不计比例<BR>        ThisDrawing.PaperSpace.Layout.StandardScale = acScaleToFit<BR>        ' 设置打印份数为1<BR>ThisDrawing.Plot.NumberOfCopies = a<BR>' 开始打印<BR>ThisDrawing.Plot.PlotToDevice<BR>Unload UserForm8<BR>' 到模型<BR>       If ThisDrawing.ActiveSpace = acPaperSpace Then<BR>       ThisDrawing.MSpace = True<BR>       ThisDrawing.ActiveSpace = acModelSpace<BR>       End If<BR>        End Sub<BR>

houlinbo 发表于 2005-2-25 21:25:00

如4楼程序所示,是我编的一个程序,启动CAD后,用程序画的第一个图,可以全图打印,删除此图,再次用程序划图,再次打印时,总是不能全图打印,是否如下语名有问题?


<TABLE class=tablebody2 style="TABLE-LAYOUT: fixed; WORD-BREAK: break-all" width="90%" border=0>
<TBODY>
<TR>
<TD style="FONT-SIZE: 9pt; LINE-HEIGHT: 12pt" width="100%">        <B></B><BR>
'打印落在选定空间内的全部内容<BR>ThisDrawing.PaperSpace.Layout.PlotType = acExtents

</TD></TR></TBODY></TABLE>
页: [1]
查看完整版本: VBA中范围打印命令是什么?