jcarmody Posted July 14, 2009 Report Share Posted July 14, 2009 How can I make a Block Diagram the active window? I'm writing a program that searches a VI for free labels (that indicate test coverage) and I need to get the BD to the front so the Object Highlite is visible. It's working, but I need to manually open the BD and move my interface out of the way. Quote Link to comment
Antoine Chalons Posted July 14, 2009 Report Share Posted July 14, 2009 Hi, I use this when I need to open the BD of a specific VI. I think you can then use the property "BlockDiagram.OSWindow" to get the ref and then use it with the user32.dll to make the window frontmost. See attached VI who does the same for a FP. ViBox_860_User32_BringVIsFPToFront.vi Hope this helps 2 Quote Link to comment
crelf Posted July 14, 2009 Report Share Posted July 14, 2009 I'm writing a program that searches a VI for free labels (that indicate test coverage)... Hmmmm. I wonder if we need to have the NI Unit Test framework work more tightly with NI Requirements Gateway... Quote Link to comment
jcarmody Posted July 14, 2009 Author Report Share Posted July 14, 2009 Hope this helps It does, thanks. Quote Link to comment
jcarmody Posted July 14, 2009 Author Report Share Posted July 14, 2009 Hmmmm. I wonder if we need to have the NI Unit Test framework work more tightly with NI Requirements Gateway... We're in the middle of planning our 2010 capital budget and I suggested that we purchase Requirements Gateway licenses, but the idea was shot down without mercy. The IT department shot down another idea to use SVN, but at least they had a reason (we use Telelogic Synergy). PS - Unit Test? What's a Unit Test? We don't need no stinkin' Unit Tests! (I misread Mr. Mussa's poll as "NO Unit Test Framework" and voted for that. I've since fixed my answer.) That feels like another purchase request that would be shot down. At least there's an alternative. Quote Link to comment
jcarmody Posted July 14, 2009 Author Report Share Posted July 14, 2009 This also works, with the added benefit of opening the VI. My problem was in trying to find a method of the BD instead of the VI. I included the Code Capture of the Traverse For References VI to show how I get an array of all my free labels (thanks Darren). Quote Link to comment
Antoine Chalons Posted July 14, 2009 Report Share Posted July 14, 2009 This also works, with the added benefit of opening the VI. My problem was in trying to find a method of the BD instead of the VI. I included the Code Capture of the Traverse For References VI to show how I get an array of all my free labels (thanks Darren). hmm I didn't know about that method.. Does anyone know what is this parameter "host window"? There is no documentation in LabVIEW about it and apparently the only acceptable value is "0" ; if I put more than zero then I can't open the BD anymore, I have to close the VI and re-open it to be able to see the BD.. Quote Link to comment
Francois Normandin Posted July 14, 2009 Report Share Posted July 14, 2009 hmm I didn't know about that method.. Does anyone know what is this parameter "host window"? There is no documentation in LabVIEW about it and apparently the only acceptable value is "0" ; if I put more than zero then I can't open the BD anymore, I have to close the VI and re-open it to be able to see the BD.. That must be the hWnd in other languages. By specifying "0", it's effectively the same as "null" is text languages, thus creating a new one. Under Windows, it's "h" for handle... I guess it is called "host" to be more cross-platform. 1 Quote Link to comment
Omar Mussa Posted July 14, 2009 Report Share Posted July 14, 2009 PS - Unit Test? What's a Unit Test? We don't need no stinkin' Unit Tests! (I misread Mr. Mussa's poll as "NO Unit Test Framework" and voted for that. I've since fixed my answer.) That feels like another purchase request that would be shot down. At least there's an alternative. Maybe I should have had 2 options -- 'None' and 'What's a unit test?' ... polling is a tricky thing to do right I guess. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.