0_o Posted August 11, 2011 Report Share Posted August 11, 2011 (edited) Hi guys, what am I missing? I was trying to get the default owning app version of an external vi yet I always get an error 7 for giving a bad path unless I connect the path from This VI. I attached a snippet. where is ??? represent the option to connect the upper option or the constant option to the path connector. If you wonder why I need it then this is the reason: I wrote a vi that opens my projects in the requested LabVIEW version (among other stuff). However, there are some projects that always open with the older version for example, thus, instead of writing it down I'd like to LV to tell me which version it was last loaded with so I could open it correctly. BTW, I'm using System Exec.vi to open projects yet even though I specify the LabVIEW version and and the project's path, many times LV still opened the project in the wrong LV (opens with the last LV version that was opened). Do you know how to deal with that maybe? Thanks in advance, Dror. Edited August 11, 2011 by 0_o Quote Link to comment
Yair Posted August 11, 2011 Report Share Posted August 11, 2011 I'm not sure what your question about opening the VI reference is exactly, but in any case, you should note that what you're doing will not help you in determining which version the VI was saved in. To do that, you need to call the Application class method Get VI Version and give it the path to the VI. Also, there's a utility called the Dataact Version Chooser which should already do this, so you might be better off using that. I haven't used it myself, so I can't comment on how it works. Quote Link to comment
0_o Posted August 12, 2011 Author Report Share Posted August 12, 2011 I'm not sure what your question about opening the VI reference is exactly, but in any case, you should note that what you're doing will not help you in determining which version the VI was saved in. To do that, you need to call the Application class method Get VI Version and give it the path to the VI. Also, there's a utility called the Dataact Version Chooser which should already do this, so you might be better off using that. I haven't used it myself, so I can't comment on how it works. Cool!!! it worked like magic! Instead of searching the property node under this vi I should have searched for it under this application. Thanks!!! I also took a look at DataAct and it appears I just wrote down something very similar to what they did only my project also takes care of Builds and TSVN. I don't know what to do now. I was about to share my work here for free but now I just feel bad for those guys since it is their only merchandize. Anyhow, thanks again for always coming to my rescue. Dror. Quote Link to comment
jdunham Posted August 17, 2011 Report Share Posted August 17, 2011 If you just use the Application property node without any refnum wired in, it will give you the current app, which it looks like you were trying to dig out with all that code. You can also change the "This VI" refnum constant into a "This Application", but that's the same as not wiring in the refnum at all. Jason 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.