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 发表评论: |
|
查看所评论的日志:田草日志 |
wyl92455 于 2008-11-25 11:24 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 发表评论: |
|
查看所评论的日志:解决笔记本没有数字键盘的软件办法 |
pgy 于 2008-11-11 09:11 PM 发表评论: |
楼主, 我好不容易找到这份资料,但是下载我了,能给我发一份吗?谢谢了! |
|
查看所评论的日志:推荐西北凡人制作的AutoCAD VBA教程【电子书】 |