LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Save As Subvi Link Broken

Hi all,

 

I have a VI with multiple subvis in it.  I did a save as with the VI to another location.  When I open that new copy, all the subvi in there have broken link.  I guess the subvis all have relative path, and since the main vi location has moved, the subvis have incorrect paths.  What is the best way to fix this?  Can I make the path of the subvi absolute? 

 

Also, I have a Vi have so many broken links in there that it will not even open.  How can you fix the broken link if the vi wont' even open?  Thanks!

 

Yik

------------------------------------------------------------------

Kudos and Accepted as Solution are welcome!
0 Kudos
Message 1 of 6
(2,515 Views)

Hi jyang72211,

  Just try to open the Vi again,the vi will start searching the subvis,please select the those subvis and save again.That will solve your problem.

 

 

Thanks and regards,

srikrishnaNF

Regards,
Srikrishna


0 Kudos
Message 2 of 6
(2,507 Views)

That's not what I am looking for.  If I do a save as for a VI, I don't want all the subivs in there to have broken link.  That's just abnormal.

 

Yik

------------------------------------------------------------------

Kudos and Accepted as Solution are welcome!
0 Kudos
Message 3 of 6
(2,494 Views)

If you "save as" to another location, you'll have to copy any subVIs to that location also. Since the main VI is configured to use those dependencies,they must be present for it to run. It's analogous to an executable with dependent DLLs or shared libraries. For your main VI to retain its functionality, the subVIs must be copied to the new location with the main VI.

 

It sounds like what you're trying to do could be accomplished quite easily with a LabVIEW project. If your main VI and subVIs are contained within a project, you can perform a "save as" on your project. That will offer you the option to copy the entire project and dependencies to the new location.

 

projectsaveas.png

 

 

Caleb Harris

National Instruments | Mechanical Engineer | http://www.ni.com/support
0 Kudos
Message 4 of 6
(2,477 Views)

To fix what you have you have to open it and navigate to the subs.

 

To adoid this issue, create a Source Distribution in your project and add that VI as the top level. Configure it to save the VI and its hiarchy to a new location "preserve hairchy". When you do that Source distribution it will pick-up that VI along with all of its subs to a new location and duplicate the folder structure. I think you also have th option to add prefixes when you do.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 5 of 6
(2,472 Views)

Hi all,

 

Sorry, I wasn't being very clear.  I want to do a save as on a main vi to another location, because I want to use that new copy for a new program with a few small changes.  Also, the subivs that were used in the original program are not located near the main VI.  They are located in a folder at a different place; they are like drivers vi. 

 

Yik

------------------------------------------------------------------

Kudos and Accepted as Solution are welcome!
0 Kudos
Message 6 of 6
(2,453 Views)