Use the following code with something which will filter the type of command i.e command is used for drawing(line, cir etc) or for cleaning( delete purge etc) or for annotation.
Code:
Dim oTimeStart
Dim oTimeEnd
Dim oTotalTime
Private Sub AcadDocument_BeginCommand(ByVal CommandName As String)
oTimeStart = Timer
End Sub
Private Sub AcadDocument_BeginLisp(ByVal FirstLine As String)
oTimeStart = Timer
End Sub
Private Sub AcadDocument_EndCommand(ByVal CommandName As String)
oTimeEnd = Timer
oTotalTime = oTotalTime + (oTimeEnd - oTimeStart)
UserForm1.Caption = Int(oTotalTime)
End Sub
Private Sub AcadDocument_EndLisp()
oTimeEnd = Timer
oTotalTime = oTotalTime + (oTimeEnd - oTimeStart)
UserForm1.Caption = Int(oTotalTime)
End Sub
Regards,
Sanjay Yallure