您好
当我关闭ACAD时,我正试图切换当前的活动工作区
但是,我收到一个错误“获取文档对象失败”
有人知道解决方法吗
谢谢
马克
- Private Sub ACADApp_BeginQuit(Cancel As Boolean)
- Dim CurrSysVarData As Variant
- Dim SysVarName As String
- Dim NewSysVarData As String
-
- SysVarName = "WSCURRENT"
- CurrSysVarData = ThisDrawing.GetVariable(SysVarName)
- NewSysVarData = "Exit"
-
- If CurrSysVarData "Exit" Then
- ThisDrawing.SetVariable SysVarName, NewSysVarData
- If MsgBox("Would you like to save this drawing?", vbYesNo) = vbYes Then
- ThisDrawing.Save
- Application.Quit
- Else
- Application.Quit
- Exit Sub
- End If
- End If
- End Sub
本帖以下内容被隐藏保护;需要你回复后,才能看到! 游客,如果您要查看本帖隐藏内容请 回复 |