Autocad 2002 and DDE Topics

Discussion in 'AutoCAD' started by dhaverstick, Jan 21, 2004.

  1. dhaverstick

    dhaverstick Guest

    I have multiple session of AutoCad 2002 running and I have a VB app that I want to use to interact with a particular Acad session. Can this be done? The only DDE stuff I can find will work only if I have one session of AutoCad running ("AutoCAD.R15.DDE|system"). Is there a way to add more DDE topics to an AutoCad session other than just "system"?
     
    dhaverstick, Jan 21, 2004
    #1
  2. dhaverstick

    Norman Yuan Guest

    Why do you need do DDE while a whole set of AutoCAD object model is
    accessible easily through ActiveX Automation since R14.01? It is incredibly
    easy to control AutoCAD through automation, using VB. I just wonder how many
    programmers (especially VBers) still know what DDE is, or was.

    want to use to interact with a particular Acad session. Can this be done?
    The only DDE stuff I can find will work only if I have one session of
    AutoCad running ("AutoCAD.R15.DDE|system"). Is there a way to add more DDE
    topics to an AutoCad session other than just "system"?
     
    Norman Yuan, Jan 21, 2004
    #2
  3. dhaverstick

    dhaverstick Guest

    Okay, then how do I accomplish what I need to accomplish using ActiveX Automation instead of DDE? I have one VB app and six sessions of Autocad running simultaneously. From the VB app I need to get the document object of drawing "ABC" that is open in Autocad session #3. How do I do this? If I use GetObject(,"Autocad.Application") I wil get the Application Object of the first session of Autocad I started. That's not the one I need. How do I specify which Application and Document object to get?
     
    dhaverstick, Jan 22, 2004
    #3
  4. Try this:

    Dim objAcad As AcadDocument
    Set objAcad = GetObject("D:\PathToYourFile\ABC.dwg")



    Automation instead of DDE? I have one VB app and six sessions of Autocad running
    simultaneously. From the VB app I need to get the document object of drawing
    "ABC" that is open in Autocad session #3. How do I do this? If I use
    GetObject(,"Autocad.Application") I wil get the Application Object of the first
    session of Autocad I started. That's not the one I need. How do I specify which
    Application and Document object to get?
     
    Chuck Gabriel, Jan 23, 2004
    #4
  5. dhaverstick

    JJS Guest

    SDI=0 then you only have one instance of autocad.
     
    JJS, Jan 23, 2004
    #5
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.