VI paths in a LV 2009 built application
#1
Posted 29 July 2010 - 01:41 PM
First off, you need to create a new destination in your build that is the path of the built application.
Then you need to explicitly add the sub-VI to the project, and set its destination to be the new destination you just created.
Now when you build the application, no matter where the sub-VI is located relative to the top-level VI, its path will always be at the "root".
This was really useful when I was building an app as an ActiveX server, and I wanted to call a VI within the app remotely using the VI server.
#2
Posted 03 September 2010 - 09:53 AM
DanS, on 29 July 2010 - 01:41 PM, said:
Could you at this info to the LabVIEW wiki?
Ton
#3
Posted 03 September 2010 - 10:21 AM
DanS, on 29 July 2010 - 01:41 PM, said:
I like to use static VI references or relative paths to get around this.

...signature shortened for Michael
#4
Posted 03 September 2010 - 01:12 PM
#5
Posted 03 September 2010 - 01:49 PM
Shaun Hayward, on 03 September 2010 - 01:12 PM, said:
I am under the impression that Static VI Refs do not load the VI into memory but they "link" to the VI (i.e. you do not have to include them in Dynamic VIs in the build spec)?
Or is there some memory hit I am unaware of? (I know Darren says he doesn't trust 'em)

...signature shortened for Michael
#6
Posted 03 September 2010 - 01:51 PM
jgcode, on 03 September 2010 - 01:49 PM, said:
Or is there some memory hit I am unaware of? (I know Darren says he doesn't trust 'em)
I was always under the impression that static refs loaded the linked VI & subVIs just like having a subVI on the block diagram would... This also seems logical to me as with a static VI ref you dont have to open the reference to access VIs properties... still if I'm wrong, that would make static refs even better
maybe someone who knows for a fact can settle this for the both of us
#7
Posted 03 September 2010 - 02:55 PM
Shaun Hayward, on 03 September 2010 - 01:51 PM, said:
You are right, I just checked it out.
I have always like using them as a way to include Dynamic VIs (i.e. in a build) and as an easy way to reference them - esp given the path changes in 9.x build model.
I also like that the top level VI doesn't not break if the Static VI is broken.
i just assumed there would be lazy loading involved if I never did anything with the ref etc...
Anyways now I can keep this in mind
Cheers

...signature shortened for Michael
#8
Posted 04 September 2010 - 05:48 AM
Or is it more like a "This VI" reference (which is a constant)?

...signature shortened for Michael
#9
Posted 04 September 2010 - 08:35 PM
... do load the referenced VI into memory
... do not need to be closed
... won't do anything if you do call Close on it
#10
Posted 05 September 2010 - 12:27 AM
I have another question on references:
If I use, say, an IN that creates a reference e.g.:
If I don't pull the reference out to use it, should I still close it?
(I ask Brian P this at NI Week, but he said without looking at the source code he didn't know).

...signature shortened for Michael
#11
Posted 05 September 2010 - 03:26 PM

Help

Back to top












