.net & Architectural Desktop

Discussion in 'AutoCAD' started by Matt Howland, Jan 24, 2005.

  1. Matt Howland

    Matt Howland Guest

    I am developing a program for Architectural Desktop 2004 and I seem to have problems using vb.net. Most of the time I cannot use the architectural types to access architectural objects. I have to use the AcadObject type in order to access any of the properties. If I try to use the architectural types for objects and then set it equal to an object, it will error saying "Not set to an instance of an object" when I try to access any of the objects properties. There is no way that I see to initialize the object besides creating a new object. I am setting variables equal to existing objects in the drawing, not creating new ones. Does anyone know why this might be? Are there updated COM files for Architectural Desktop 2004 that work better w/ .net? If you need more information, let me know I can be more specific. Thanks.
     
    Matt Howland, Jan 24, 2005
    #1
  2. FAIK 2004 does not suport .NET. You need to provide your own COM wrappers.

    -- Mike
    ___________________________
    Mike Tuersley
    CADalyst's CAD Clinic
    Rand IMAGINiT Technologies
    ___________________________
    the trick is to realize that there is no spoon...
     
    Mike Tuersley, Jan 24, 2005
    #2
  3. Mike,
    Do you have a sample wrapper by any chance or pointer???

    Ashante,
    Paul
     
    Paul Richardson, Jan 24, 2005
    #3
  4. No, sorry Paul, I don't. Let me check internall and see if I can locate
    something.

    -- Mike
    ___________________________
    Mike Tuersley
    CADalyst's CAD Clinic
    Rand IMAGINiT Technologies
    ___________________________
    the trick is to realize that there is no spoon...
     
    Mike Tuersley, Jan 25, 2005
    #4
  5. No problem...Thanks...I will post if I figure it out..

    Thank You,
    Paul
     
    Paul Richardson, Jan 25, 2005
    #5
  6. Matt Howland

    Matt Howland Guest

    I found the solution for my problem I believe. When I was looking into com wrappers I read about interface objects. When you import a type library to .Net it puts an "I" in front of all of the interface objects. Instead of calling AecWall you call IAecWall. This seems to work at this point. I am able to call all of the objects using the proper type. I would be interested in knowing if others find this to be successful or if you have problems. Thanks.

    Matt
     
    Matt Howland, Jan 26, 2005
    #6
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.