tiancao1001 于 2008-12-12 09:56 AM 发表评论: |
在一些平台下确有这个问题,暂时解决方法: 在选项命令中(_OPTIONS)选择文件项, 在打印支持文件路径->打印样式表路径中, 显示路径为:c:\Tangent\TArch7\SYS;D:\Documents and Settings\whl\Application Data\Autodesk\AutoCAD 2006\R16.2\chs\Plot Styles。 选中这个路径项,按F2对其编辑。 AutoCAD不支持多个打印样式表路径,将C:\Tangent\TArch7\sys项删除即可 |
|
查看所评论的日志:AutoCAD 打印 打印样式 致命错误 退出 |
tiancao1001 于 2008-12-02 01:39 PM 发表评论: |
'快速打印 Function KSDY2(P1 As Variant, P2 As Variant)
Dim PtMin As Variant Dim PtMax As Variant PtMin = P1 PtMax = P2 ReDim Preserve PtMin(0 To 1) ReDim Preserve PtMax(0 To 1) ' 设置打印比例为“布满图纸” ThisDrawing.ActiveLayout.StandardScale = acScaleToFit ThisDrawing.ActiveLayout.SetWindowToPlot PtMin, PtMax ' 设置打印类型为窗口 ThisDrawing.ActiveLayout.PlotType = acWindow '设置为居中打印 ThisDrawing.ActiveLayout.CenterPlot = True
If Me.OptionButton4.Value = True Then '启用打印预览 ThisDrawing.ActiveLayout.GetWindowToPlot PtMin, PtMax ThisDrawing.Plot.DisplayPlotPreview acFullPreview Else '打印当前的区域 '若选中“打印到文件” If PlotTofile_CheckBox.Value Then If PlotFilesPath_ComboBox.text = "" Then PlotFilesPath_ComboBox.text = GetPath ThisDrawing.Plot.PlotToFile PlotFilesPath_ComboBox.text & ThisDrawing.Name & "-" & N & ".plt" N = N + 1 Else ThisDrawing.Plot.PlotToDevice ThisDrawing.ModelSpace.Layout.ConfigName End If End If End Function |
|
查看所评论的日志:CAD VBA 实现图纸的快速打印 |
tiancao1001 于 2008-12-02 12:24 AM 发表评论: |
'输出wmf文件 Public Function WMFOut(P1 As Variant, P2 As Variant, FileName As String) ThisDrawing.Application.ZoomAll '创建空选择集 Dim SSet As AcadSelectionSet Set SSet = CreateSelectionSet("XXX")
'为选择集添加对象 SSet.Select acSelectionSetWindow, P1, P2
'将选择集中对象传递给Obj对象数组 Dim Obj() As Object Dim i As Long ReDim Obj(0 To SSet.Count - 1) As Object For i = 0 To SSet.Count - 1 Set Obj(i) = SSet.Item(i) Next i Dim X As Double Dim Y As Double X = Abs(P1(0) - P2(0)) '图形宽度 Y = Abs(P1(1) - P2(1)) '图形高度 Dim Xy As Double Xy = X / Y '图形宽高比 X = 600 '文档视口宽度 Y = 600 / Xy '文档视口高度 ThisDrawing.Width = X ThisDrawing.Height = Y ThisDrawing.Application.ZoomWindow P1, P2 '导出wmf文件 If UCase(Right(FileName, 4)) = ".WMF" Then FileName = Left(FileName, Len(FileName) - 4) End If ThisDrawing.Export FileName, "WMF", SSet End Function |
|
查看所评论的日志:CAD VBA 输出WMF文件 和导入WMF文件 |
tiancao1001 于 2008-11-27 09:59 PM 发表评论: |
|
查看所评论的日志:田草日志 |
tiancao1001 于 2008-11-20 05:52 PM 发表评论: |
|
查看所评论的日志:田草日志 |
tiancao1001 于 2008-11-19 09:15 AM 发表评论: |
|
查看所评论的日志:田草日志 |
tiancao1001 于 2008-11-17 11:55 AM 发表评论: |
Function TC(e As AcadEntity) On Error Resume Next '填充面域 Dim TC_Entity(0 To 0) As AcadEntity Dim TC1 As AcadHatch Dim TC_Name As String Dim TC_Type As Long Dim TC_Associativity As Boolean TC_Name = "SOLID" TC_Type = 0 TC_Associativity = True Set TC1 = ThisDrawing.ModelSpace.AddHatch(TC_Type, TC_Name, TC_Associativity) Set TC_Entity(0) = e TC1.AppendInnerLoop (TC_Entity) TC1.Evaluate 'ThisDrawing.SetVariable "HPDRAWORDER", 1 End Function |
|
查看所评论的日志:将Solid实体转换成图案填充 |
tiancao1001 于 2008-11-14 01:23 PM 发表评论: |
|
查看所评论的日志:解决笔记本没有数字键盘的软件办法 |