帮忙看看这一点程序,关于打印的问题,有何不妥!
<P><BR>Private Sub cmdOk_Click()<BR> Dim adText As AcadText<BR> Dim adMText As AcadMText<BR> Dim adSS As AcadSelectionSet<BR> Dim fType(0 To 1) As Integer, fData(0 To 1)<BR> Dim i As Integer<BR> Dim origin(0 To 1) As Double<BR> origin(0) = 10: origin(1) = 6<BR> If lstfile.ListCount = 0 Then<BR> MsgBox "请添加所要打印的柱状图!"<BR> Exit Sub<BR> End If<BR> <BR> '打开图形进行操作<BR> For i = 0 To lstfile.ListCount<BR> Application.Documents.Open lstfile.List(i)<BR> <BR> On Error Resume Next<BR> frmMain.Hide<BR> '创建新选择集<BR> '开始打印<BR> ZoomExtents<BR> ThisDrawing.ModelSpace.Layout.ConfigName = "HP LaserJet 5000 Series PCL6.pc3"<BR> ThisDrawing.ModelSpace.Layout.StyleSheet = "柱状图.ctb"<BR> ThisDrawing.ModelSpace.Layout.PaperUnits = acMillimeters<BR> ThisDrawing.ModelSpace.Layout.PlotOrigin = origin<BR> ThisDrawing.ModelSpace.Layout.CanonicalMediaName = "A4"<BR> ThisDrawing.ModelSpace.Layout.StandardScale = ac1_1<BR> ThisDrawing.ModelSpace.Layout.PlotRotation = ac0degrees<BR> ThisDrawing.ModelSpace.Layout.PlotType = acExtents<BR> ThisDrawing.Regen acActiveViewport<BR> ThisDrawing.Plot.DisplayPlotPreview acFullPreview<BR> 'ThisDrawing.Plot.PlotToDevice<BR> '关闭图形<BR> Application.ActiveDocument.Save<BR> 'Application.ActiveDocument.Close True, lstfile.List(i)<BR> Next i<BR>End Sub</P><P>在这儿ThisDrawing.ModelSpace.Layout.PaperUnits = acMillimeters我这儿我设置的图纸的尺寸以mm为单位了,也regen了,为什么实际上预览图纸的时候是以英寸为单位的呢?各位高手有谁也预见了同样的问题呢!</P> <P>设置的是在页面设置对话框中显示的单位,而不是图形的单位。</P> 我指的就是图纸的尺寸! 其实内部都是以毫米为单位的,只是显示的是英寸而矣,没事没事。
页:
[1]