Document Activated

Discussion in 'AutoCAD' started by Jorge Jimenez, Sep 13, 2004.

  1. Has anybody implemented a
    Document Activated event for a VB DLL app ??

    I understand Tony Tanzillo had such an utility
    but it's not available anymore.
    does anybody know of any other utility that has such an event ??
    Or any other way of doing it ??
     
    Jorge Jimenez, Sep 13, 2004
    #1
  2. Jorge Jimenez

    Joe Sutphin Guest

    I wrote an article one time about how to do this. Send me a direct email [as
    a reminder] and I'll see if I can locate it.

    Joe
     
    Joe Sutphin, Sep 13, 2004
    #2
  3. Jorge Jimenez

    SpeedCAD Guest

    SpeedCAD, Sep 13, 2004
    #3
  4. No, I'm talking about knowing when the user
    switches to another document in VB
     
    Jorge Jimenez, Sep 14, 2004
    #4
  5. Jorge Jimenez

    SpeedCAD Guest

    Hi...

    Yes, you can... Just add un Timer control to VB proyect.
     
    SpeedCAD, Sep 14, 2004
    #5
  6. That's a very poor and error-prone solution.

    Exporting AcApDocManagerReactor::documentActivated via COM is very
    reliable and not all that complicated.

    Unfortunately, it's been so long since I've worked with ObjectARX I
    don't remember how to do it. Not to mention there seems to be come kind
    of incompatability between ObjectARX and VS.NET 2003.
     
    Frank Oquendo, Sep 14, 2004
    #6
  7. Jorge Jimenez

    SpeedCAD Guest

    But it work ;)
     
    SpeedCAD, Sep 14, 2004
    #7
  8. as there are more difficulties at watching when the user opens a
    document, creates a new one (where object-modified-events are missing)
    i'm used to do a workaround with vba:

    within vba i initialize my app with getinterfaceobject

    within vba i watch the events (and there the event DocumentActivated and
    all other document-specific events work fine)

    if an event occurs in vba i call a function within my vb-dll that has to
    the work



    hope this helps - alfred -
     
    Alfred NESWADBA, Sep 14, 2004
    #8
  9. Thanks for the help Alfred.
     
    Jorge Jimenez, Sep 14, 2004
    #9
  10. Thanks for the tip.

    What are the compatibility issues between C# and ObjectARX ??
     
    Jorge Jimenez, Sep 15, 2004
    #10
  11. It's not C# that's the problem, it's C++.

    Apparently, VC++ 2003 now uses MFC 7.1 while AutoCAD 2005 uses MFC 7.0
    which is the version used by VC++ 2002.

    Since only the ObjectARX API exports the types of functionality I
    mentioned earlier, you can't use stock VS.NET 2003 to create an ARX file.
     
    Frank Oquendo, Sep 15, 2004
    #11
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.