Jump to content

Calling LabVIEW.exe from another exe


Recommended Posts

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

Link to comment

* 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 by ShaunR
Link to comment

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

Link to comment

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

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.