03-16-2010 10:20 AM
I'm a labview newbie (software developer by trade), but I have a question about an issue which is causing me some headaches. I'm currently creating a VI which uses custom controls. I'm assuming when I add the custom control to a vi, in the background somehow Labview adds an include-like statement to the VI stating the exact location of this control. My question is: Can I view how Labview references the control, and more importantly, can I modify it to be a relative path.
I've done a few searches for modifying dependencies, but EVERYTHING I see has to do with Labview projects. This is NOT a part of a labview project. The VI and the control are both in the same llb file, but I would like to be able to move the llb between multiple computers and users and have everything work seemlessly. Thanks for any and all help!
03-16-2010 12:48 PM
Hi hillchri,
as far as i know the link between your vi and the control is relative. If both are part of the llb, then you'll never have problems to load your vi.
Mike
03-16-2010 12:52 PM
Ok, that makes sense. I was noticing that some of the controls (now I see that its those that were in the llb) were working fine, and those that weren't in the llb were not. How do I get relative pathing to work if the control isn't in the llb?
03-16-2010 12:55 PM
Hi hillchri,
Something you can do to view the list of custom controls is open up the VI Hierarchy (View > View Hierarchy). This window will display a list of Type Defs referenced by your VI (I don't think custom controls will show up...). Other than this, I'm not sure if there is a way to get a list of references custom controls for a VI outside of the project environment.
There's not a way to dynamically explicitly specify the path of a control to load on the front panel (other than doing it manually). The only work-around to this is to use Labview Scripting, which allows you to dynamically drop objects on the front panel and/or block diagram.
In your case, it does not seem like you will need to do this, though I am still a bit unclear on what you're trying to do. When you move the VI and custom controls in an LLB, everything should open up with no problems. Is your goal to dynamically determine which control will be loaded on the front panel of the VI? Sorry if I'm misunderstanding something...
03-16-2010 12:58 PM
Ah, now I have some new information to go with...
When Labview is loading your VI, it will look for the custom control referenced by the VI. If it cannot find the control, it will look in some pre-determined directories to see if it'll find the control there. These directories are specified in Tools > Options > Paths > VI Search Path. So if your custom control will always reside in some particular directory, you can specify that directory in the VI Search Path list.
03-16-2010 01:21 PM
Thanks for the info about where the path is specified. I think I should be able to solve my problems using that!
03-16-2010 01:32 PM
If you plan to install your application on a target machine with ONLY LabVIEW run-time engine installed, then you can specify the path in the ini file that is created when you build the application.
For example, if you create MyCoolApp.exe using App builder, then you can specify various paths in your ini file (MyCoolApp.ini😞
viSearchPath="C:\MyCoolApp\library\*;C:\MyReuseVIs\libraries\*"
07-04-2010 12:58 PM
Hello,
I'm encountering a similar issue. I have a main VI with some custom controls and a couple of subVIs all in the same folder. However if i were to copy that entire folder to my thumbdrive or to any other computer, and when i restart the main VI from that new location, all the dependency warnings will pop out.
I see that you mentioned something about llb? How do i make all those controls and vi to be part of an llb?