LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
_carl

Enable "Replace with..." when dependency not found in project.

Status: New

When refactoring code, I often find myself in a situation where I've broken dependencies. Maybe it's a name change, or a library path change. This is precisely when I'm most in need of the ability to just replace the missing file (be it a VI, control, class, or PPL).  Yet this is when LabVIEW decides that nope, it can't be that easy:

 

_carl_1-1709776637528.png

 

Instead you have to track down every instance and manually swap them out.

 

The request: allow us to replace missing files using the "Replace with..." option.

 

3 Comments
_carl
Member

I've realized that, since I posted this, there are situations where the "Replace with..." option is enabled. I don't know what determines this (maybe it's file type?). However, it doesn't let you dig into PPLs (and I'd guess other files).  So let's say you're trying to replace a VI with a VI in a PPL -- you can't, because LabVIEW will tell you that the PPL is the wrong data type when selected, rather than opening up the typical PPL browser window that then let's you select the VI.

fefepeto_kb
Member

I have no example code to try this, maybe you could post an example code with some instructions to replicate the issue. But from the top of my head there might be two things to try:

  • The load option, maybe it shows a dialog where you can select the renamed file.
  • Checking if the PPL or the owning library shows up in the dependencies and trying to replace that. I know that replacing the library will most likely work if the file name is not changed, so there can definitely be improvements about this part of the environment.
_carl
Member

In playing around with this some more, it appears that the "Replace with" option is available with VIs and typdefs, but not with classes.

 

Perhaps the original title should be "General Improvements to 'Replace with...' Functionality for Dependencies".  In which case I'd add a few more things to the list:

 

  • Missing Classes can't be replaced with "Replace with..."
  • Replacing a PPL with a duplicate (and renamed) version of itself often crashes.
  • Missing PPLs don't appear as PPLs, but instead as all of their individual files. This can make it excruciating to relink to a renamed PPL.
  • Replacing VIs and controls only allows selection of files on disk. If you select a library/PPL, then the standard popup for selecting your file from with that library isn't shown.  Instead you get an error that the selected library isn't of the correct data type.
  • This topic could probably be expanded to include improvements to searching for files when broken dependencies are detected on opening a project.  For instance, if you point LabVIEW to a PPL, and it knows the expected relative path within the PPL, it still forces you to manually find the file in the PPL rather than using the known relative path.