Getting the active window

Discussion in 'SolidWorks' started by koorzena, Dec 10, 2008.

  1. koorzena

    koorzena Guest

    Hi All

    I have some code for an addin that I'm currently writing for
    Solidworks 2009. Most of it is done but there is a problem I'm running
    into -

    I'm trying to get the measure tool to measure between 2 points - got
    that part done. But instead of showing the measure tool itself, I only
    want to show the x,y,z difference. So in other words i'd like to hide
    the measure tool window.

    Someone suggested I use the hwnd = GetActiveWindow to hide the measure
    tool window.

    Only problem is my own addin has a button that you click in order to
    do this. So this is what's wrong:

    1. click button to measure
    2. hwnd = GetActiveWindow <- returns my addin's window handle and not
    that of the measure tool
    3. hide's the wrong window.

    Is there another way of getting the measure tool's window by perhaps
    using a header ?
     
    koorzena, Dec 10, 2008
    #1
  2. koorzena

    Cowboy Shane Guest

    How about (rather than use the measure tool) use the solidworks.maths
    object to make some vectors, subtract them, and get the length? (i.e.
    do it 'manually')...
     
    Cowboy Shane, Dec 15, 2008
    #2
  3. koorzena

    koorzena Guest


    Hi there...

    Reason I'm using it in such a manner is to show the spatial difference
    (difference in X,Y,Z) between two points visually - i don't want to
    calculate it... yet...for now I'm only interested in showing those
    differences...

    Anyone out there know how?
     
    koorzena, Dec 18, 2008
    #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.