AutoCAD 2005 and .NET

Discussion in 'AutoCAD' started by Fred Vandervelde, May 6, 2004.

  1. Hi there,

    I'm relatively new to the AutoCAD programming world, but I have a rather
    extensive software development background. I've been working with the .NET
    assemblies Autodesk has included with version 2005, and have a few questions
    in the hope that someone can point me in the right direction.

    What I need to accomplish is this:

    1. I need to create a 'command' that pops up a dialog allowing the user to
    select a certain item.
    2. Upon selection, I need to invoke a command to insert text with a leader
    into the drawing, the text being determined by what the user selects.
    3. I'd also like to be able to 'embed' some additional properties along
    with each one of these text entities, that can be read at a later date.

    I'm having a few problems. I have created my own .NET assembly that does
    what I need in #1. However, just to test I sent the item text to the ACAD
    commandline upon each selection. The problem with this is that my text
    doesn't show up until I manually set the focus back to ACAD from my .NET
    dialog.

    The second issue is that I can't seem to find a way to programmatically
    insert text with a leader using the .NET API provided. VBA provides the
    ability to use 'GetPoint' to prompt for a point (ie the points of the
    leader) but there appears to be no counterpart in the .NET API. Has anyone
    done anything like this? Should I be looking at VBA/LISP/ObjectArx instead
    to accomplish these tasks? I was hoping to avoid using COM Interop with
    ..NET since it is so _slow_ but I suppose that may be another way to go.

    If anyone can point me in the right direction, it would be much appreciated.

    Thanks,

    Fred Vandervelde
     
    Fred Vandervelde, May 6, 2004
    #1
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.