API: getting 3d entities info from their Drawing counterpart

Discussion in 'SolidWorks' started by zinedine, Nov 2, 2005.

  1. zinedine

    zinedine Guest

    I have been asked to write an add-in that does this:
    loop through the entities of a drawing view and for each of them get
    the associated 3d entity (typically an edge)

    I have no Solidworks API skills.
    Looking at the documentation and the available examples I have inferred
    that I can easily access entities in a drawing view calling
    IGetPolylines5.
    The problem is that I could not find how to associate each of these
    lines, arcs, etc. to their corresponding 3d edges (or even to the
    related features)

    This info seems to be available for driven dimensions
    (Annotation::GetAttachedEntities2) while this apparently does not work
    for driving dimensions as they don't return any associated entity.

    Could someone please help me ?

    Thanks in advance
     
    zinedine, Nov 2, 2005
    #1
  2. I have this to say: good luck!

    I looked at doing this a few years ago, so I don't know if there have
    been any improvements in the API to help with this. What I found is
    that there is really no easy and straightforward way to do this. The
    best solution that I could come up with was to get the sketch entities
    and the 3d model edge entities and then use the model to drawing
    transform to mathematically compute which edge matched up to which
    sketch entity. Not too fun. In the end I never implemented this
    because we decided that it was not worth it.

    If you come up with anything better, let me know.

    Jonathan Anderson
     
    Jonathan Anderson, Nov 3, 2005
    #2
  3. zinedine

    Bob Hanson Guest

    Before we focus on the solution, can I ask what you are looking to
    achieve with this add-in?

    Best Regards,

    Bob Hanson
    Senior SW API Solutions Developer
    Centare Group Ltd.
    www.centare.com
     
    Bob Hanson, Nov 8, 2005
    #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.