Eugen Graf Posted August 17, 2007 Report Share Posted August 17, 2007 Hello, can anybody help. I want to get the path to the frontmost VI if mouse was doubleclicked. Probably my solution will work with an EXE, but it don't work while programming. Eugen Quote Link to comment
shoneill Posted August 17, 2007 Report Share Posted August 17, 2007 QUOTE(Eugen Graf @ Aug 16 2007, 10:25 PM) Hello, can anybody help. I want to get the path to the frontmost VI if mouse was doubleclicked. Probably my solution will work with an EXE, but it don't work while programming.Eugen On a side note, AFAIK, if the VIs are in memory (which they'll have to be to be front-most ) you don't need a full path for the "open" command. Just a string of the VI name will do. Why shouldn't this work while programming? I think it should. Ah. You're building the paths from your "App" instance. While programming, this is LabVIEW itself I believe. In an EXE it's your build program. I think you need to switch paths depending on whether you're running a built program or within the development environment. Or you can just get "All VIs in memory" passing only these strings to the "open" command and forget the path altogether. Shane. Quote Link to comment
orko Posted August 17, 2007 Report Share Posted August 17, 2007 QUOTE(Eugen Graf @ Aug 16 2007, 01:25 PM) Hello, can anybody help. I want to get the path to the frontmost VI if mouse was doubleclicked. Probably my solution will work with an EXE, but it don't work while programming.Eugen Your problem might lie in the application reference. In LV8+ they changed some things over and I've been using the VI at vi.lib\Utility\allVIsInMemory.llb\Get User Application Reference.vi to get the app reference for utilities in different app instances (ie: project tools). Quote Link to comment
Eugen Graf Posted August 17, 2007 Author Report Share Posted August 17, 2007 In fact I want to get the reference to the double clicked control. And NO, GetAllVIsIn Memore gives only VI Names without a full path. Thanks, Eugen Quote Link to comment
Jim Kring Posted August 17, 2007 Report Share Posted August 17, 2007 QUOTE(Eugen Graf @ Aug 16 2007, 01:25 PM) Hello, can anybody help. I want to get the path to the frontmost VI if mouse was doubleclicked. Probably my solution will work with an EXE, but it don't work while programming.Eugen Try these green VIs: http://forums.lavag.org/index.php?act=attach&type=post&id=6654 http://forums.lavag.org/index.php?act=attach&type=post&id=6655 Cheers, -Jim Quote Link to comment
shoneill Posted August 17, 2007 Report Share Posted August 17, 2007 QUOTE(Eugen Graf @ Aug 16 2007, 11:18 PM) In fact I want to get the reference to the double clicked control.And NO, GetAllVIsIn Memore gives only VI Names without a full path. Thanks, Eugen Yeah, I understand. You don't need a full Path to open a reference to a VI in memory. Once you have the reference open, you can get the path there. I reckon the path is part of your problem. http://forums.lavag.org/index.php?act=attach&type=post&id=6656''>http://forums.lavag.org/index.php?act=attach&type=post&id=6656'>http://forums.lavag.org/index.php?act=attach&type=post&id=6656 Any reason why this shouldn't do what your original code wanted to do (Differences in output handling excepted)? It works on my 8.2.1 in development mode. How you get the single control is entirely a different story of course. Shane. 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.