Jump to content

Calling LabVIEW.exe from another exe


Recommended Posts

Posted

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

Posted (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 by ShaunR
Posted

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

Posted

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

Posted

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?

Posted

Well, I'm stuck with 7.1 FDS.sad.gif

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.

Join the conversation

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

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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.