bburan Posted February 15, 2006 Report Share Posted February 15, 2006 When I first started out creating my application, I tried saving my subVIs in folders according to their purpose. For example, subVIs to extract my experiment data from text files went in one folder, subVIs to perform signal processing went in another, and then I had a "miscellaneous" folder for some subVIs that did not logically fit into any of the other folders I made. Looking back on my hierarchy, I realize that I made some bad choices about where I placed my subVIs, and want to rearrange them. The problem, however, is that when I rearrange them, I have to go through every VI that uses these subVIs and teach the VI the new location of the subVI. Is there any way to avoid having to do this? Quote Link to comment
AutoMeasure Posted February 15, 2006 Report Share Posted February 15, 2006 Best thing is to have one top-level VI and all the other VIs be subVIs in that top-level VI's hierarchy, then make sure that all the subVIs are in the same folder as the top-level VI or in one or more sub-folders of that folder. Then when you open your top-level VI in Labview, all the VIs will find their subVIs even if the relative paths have changed. There are a lot of considerations here, but to make a long story short: In Labview 7.1, go to Tools > Options, then select Paths from the top pull-down, then select VI Search Path from the pull-down below that one. The defaults are usually more than adequate, as it looks in your top-level VI's folder and all subfolders (\* means all subfolders), then in folders that it's found other VIs in, then in Labview's vi.lib, user.lib, and instr.lib folders. If you're really in a bind, add some absolute paths to this list to get all your VIs to find their subVIs without giving you any pop-ups. Best of luck. Quote Link to comment
PJM_labview Posted February 16, 2006 Report Share Posted February 16, 2006 When I first started out creating my application, I tried saving my subVIs in folders according to their purpose. For example, subVIs to extract my experiment data from text files went in one folder, subVIs to perform signal processing went in another, and then I had a "miscellaneous" folder for some subVIs that did not logically fit into any of the other folders I made. Looking back on my hierarchy, I realize that I made some bad choices about where I placed my subVIs, and want to rearrange them. The problem, however, is that when I rearrange them, I have to go through every VI that uses these subVIs and teach the VI the new location of the subVI. Is there any way to avoid having to do this? When you load a VI in memory, LabVIEW will search for the subVIs in this order: - Memory - Subfolder form where the VI came from - VI search path (defined in the LabVIEW options) Therefore, for your particular problem, just reorganize your VIs the way you want, and then open your hierarchy (all the VIs) manually form the bottom up (the VIs further down in the hierarchy first) if possible. LabVIEW will automatically relink to the VIs already in memory. Once everything has been loaded, resave all your VIs to make the new linking persistent. PJM 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.