- 积分
- 613
- 明经币
- 个
- 注册时间
- 2002-7-2
- 在线时间
- 小时
- 威望
-
- 金钱
- 个
- 贡献
-
- 激情
-
|
2004的使用带来的便捷是显著的
单麻烦也随之而来
能有相当的用户使用r14,而2004无法直接转为r14需转为r2000再转为r14,
费时费力,笔者想通过程序将r2004直接转为r14,遇到一些困难,请大伙帮助解决!
Dim acadapp As AcadApplication
Dim acaddoc As AcadDocument
On Error Resume Next
Set acadapp = GetObject(, "AutoCAD.application.16")
If Err Then
Err.Clear
Set acadapp = CreateObject("AutoCAD.application.16")
If Err Then
MsgBox Err.Description
Exit Sub
End If
End If
acaddoc.apen ("c:\1.dwg")
Set acaddoc = acadapp.ActiveDocument
MkDir "d:\wd"
acaddoc.SaveAs "d:\wd\1.dwg", ac2000_dwg
acadapp.Quit
Set acadapp = Nothing
Set acaddoc = Nothing
On Error Resume Next
Set acadapp = GetObject(, "AutoCAD.application")
If Err Then
Err.Clear
Set acadapp = CreateObject("AutoCAD.application")
If Err Then
MsgBox Err.Description
Exit Sub
End If
End If
acadapp.Activate
acadapp.Application.Visible = True
acadapp.Documents.Open ("d:\wd\1.dwg")
Set acaddoc = acadapp.ActiveDocument
acaddoc.SaveAs "d:\wd\1.dwg" ac14_dwg
'acadapp.Quit |
|