Results 1 to 2 of 2

Thread: VB to Create Time Record in AutoCAD 2006

  1. #1
    Woo! Hoo! my 1st post
    Join Date
    2005-10
    Posts
    1

    Default VB to Create Time Record in AutoCAD 2006

    Can anyone help me to create a VB Function that will basically automatically calculate the time that I worked in a drawing by certain criteria such as Designing, Cleanup, Notes, etc., I am very inexperienced in VB but can follow directions. I imagine that this may not be enough info in the beginning.Please let me know what you require to help.
    Thanks

  2. #2
    Member sanjay_yallure's Avatar
    Join Date
    2004-08
    Location
    India, Ahmedabad
    Posts
    10

    Default Re: VB to Create Time Record in AutoCAD 2006

    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
    Last edited by Opie; 2006-02-03 at 01:53 PM. Reason: [CODE] tags added

Similar Threads

  1. Time delay when using certain commands in AutoCAD LT 2006
    By nw-surv3 in forum AutoCAD LT - General
    Replies: 2
    Last Post: 2007-02-14, 11:02 AM
  2. Replies: 1
    Last Post: 2006-11-09, 07:50 PM
  3. Create Bezier Surfaces in AutoCAD 2006
    By osw201 in forum AutoCAD 3D (2006 or below)
    Replies: 3
    Last Post: 2006-11-03, 07:50 PM
  4. Replies: 3
    Last Post: 2006-02-10, 10:57 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •