Black Pearl Posted November 12, 2010 Report Share Posted November 12, 2010 I've done a simple merging tool for Hg. Hg is needing an executable. This executable (of course coded in LV) is calling the LabVIEW.exe via VI Server to open the vi's (local, other, base, output) to be merged. Here my open issues: * If LabVIEW isn't open, Open Apllication Ref is returning an error. Is there a more elegant way of starting LabVIEW than using System Exec? * How can I bring the LabVIEW.exe (or the opend vi's) to the front? Application.BringToFront didn't work (without error). Currently The opened vi's are behind my merge.exe and the hg repro browser. Felix Quote Link to comment
ShaunR Posted November 12, 2010 Report Share Posted November 12, 2010 (edited) * If LabVIEW isn't open, Open Apllication Ref is returning an error. Is there a more elegant way of starting LabVIEW than using System Exec? That's the only way as far as I know. * How can I bring the LabVIEW.exe (or the opend vi's) to the front? Application.BringToFront didn't work (without error). Currently The opened vi's are behind my merge.exe and the hg repro browser. You'll have to use OS specific calls such as "BringWindowToTop" if you are outside the LV environment. Edited November 12, 2010 by ShaunR Quote Link to comment
Black Pearl Posted November 12, 2010 Author Report Share Posted November 12, 2010 I moved my code in the LV enviornment calling the vi from the exe. (otherwise I couldn't call BDWin.Open). I am using VI:FP.IsForemost and App:BringToFront. My merge menu is modal and is on the top, but Hq stays before the vi's to merge. Haven't seen this effect that another app can place it's window between the LV windows. As soon as I click on the merge menu, the vi's are placed in front of Hq. I'll give the OS-call a try. I'm already so much relying on Win with this code. Felix Quote Link to comment
Black Pearl Posted November 12, 2010 Author Report Share Posted November 12, 2010 The winAPI calls didn't help. But strangely this did the trick: Uncheck 'Hide when LabVIEW is not active'. (the window is floating, not modal as I wrote above). It's not really perfect, als the hg-mergelauncher slipps in when the MergePlugin.vi was open when I started a merge. But this isn't the normal usage, so forget about it. Wonder if I get more of these issues. I think that LV isn't playing to well with gtk on Win. Felix Quote Link to comment
ned Posted November 12, 2010 Report Share Posted November 12, 2010 I've done a simple merging tool for Hg. Are you aware that as of LV2009, LabVIEW (Professional and above) includes lvmerge.exe, which probably does what you want already? Quote Link to comment
asbo Posted November 12, 2010 Report Share Posted November 12, 2010 I thought that LVMerge was around a lot longer ago than LV2009 - there's a help document that is labeled with LV8.5 ... ref: http://zone.ni.com/reference/en-XX/help/371361D-01/lvhowto/configmerge_thirdparty/ Quote Link to comment
Black Pearl Posted November 12, 2010 Author Report Share Posted November 12, 2010 Well, I'm stuck with 7.1 FDS. Felix Quote Link to comment
hooovahh Posted November 17, 2010 Report Share Posted November 17, 2010 Well, I'm stuck with 7.1 FDS. Felix No need to be sad, 7.1 is my favorite version...of course when I find I can't do something I just use a newer version. But I haven't found much that 7.1 can't do that 2010 can, without making some custom code. 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.