Code to handle the Event Handler in VBA

Discussion in 'AutoCAD' started by Santhosh, Jul 27, 2004.

  1. Santhosh

    Santhosh Guest

    Hello,

    I am trying to customize AutoCAD through VBA. I am getting an Error in the ObjectAdd procedure. How to over come this.

    The code goes like this
    Private Sub Acade_ObjectAdd(ByVal Object as Object)
    Debug.Print TypeName(Object)
    End sub

    please help me in this regard

    Thanking you,
    Santhosh
     
    Santhosh, Jul 27, 2004
    #1
  2. In addition to any replies you might receive or already
    received, you may find more information or responses
    by posting future VBA related questions in the following
    discussion group:

    By NNTP discussion group reader at
    news://discussion.autodesk.com/autodesk.autocad.customization.vba

    By HTTP (web-based) interface at
    http://discussion.autodesk.com/forum.jspa?forumID=33

    --
    Autodesk Discussion Group Facilitator


    ObjectAdd procedure. How to over come this.
     
    Jason Piercey, Jul 27, 2004
    #2
  3. Santhosh

    Doug Broad Guest

    Santhosh,
    Unless your using a foreign language version, it would be:

    Private Sub AcadDocument_ObjectAdded(ByVal Object As Object)
    Debug.Print TypeName(Object)

    End Sub

    The function above works for me but the output goes to the
    vbaide immediate window, not the command line.
    Be sure to indicate the foreign language version if applicable.

    Regards,
    Doug
     
    Doug Broad, Jul 27, 2004
    #3
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.