Getting the active window

Dec 10, 2008 2 Replies

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

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')...

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?

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required