抱歉,刚刚扫描并误读了OP中的活动工作区;试试看
- Private Sub AcadDocument_BeginClose()
- If Documents.Count = 1 Then
- 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 If
- End Sub
是的,我确实把我的工作空间搞砸了 ;Doh! |