 - On Error Resume Next
- Set objcad = GetObject(, "AutoCAD.Application")
- If Err Then
- Err.Clear
- 'MsgBox "未发现已打开的AutoCAD,请开启AutoCAD后,打开文件夹【D:\某程序\】执行手动安装"
- Set objcad = CreateObject("AutoCAD.Application")
- objcad.Visible = True
- Set ThisDrawing = objcad.activedocument
- Path = Replace(Path, "\", "\\")
- ThisDrawing.SendCommand ("(load ""D:\\某程序\\模拟安装.lsp"")" & vbCr)
-
- Else
- Set ThisDrawing = objcad.activedocument
- Path = Replace(Path, "\", "\\")
- ThisDrawing.SendCommand ("(load ""D:\\某程序\\模拟安装.lsp"")" & vbCr)
- End If
|