From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Can't replace a stale dependency in a LV project with correct dependency?

I have a LV project which contains a VI called "Main_Panel.vi".  there is a typedef which it is depends on (let's call it typedefAversion1).  I had to move the file which defines typedefAversion1 to another location in the file system.  Let's call the moved typedef "typedefAversion2".

 

Everytime I open the project, it complains that it can't find typedefAversion1.  I tell it where to find typedefAversion2 and then it is happy - until the next time that I open the project.   Then it complains again.

 

I've tried locating typedefAversion1 in the "dependencies" tree in the LV project and right-clicking and selecting "replace with", then pointing it to typedefAversion2.  All that happens is that typedefAversion1 disappears from the project dependencies for an instant, then re-appears.  Why is it still in the dependency tree when I just told it to get replaced?

 

Note that I cannot simply update "Main_Panel.vi" by manually replacing the typedef in the VI with the new one - this typedef is found in hundreds of locations throughout my project, and in many VIs.

 

what is a quick and simple way to tell labview to stop looking for typedefVersion1 and instead look for trpedefVersion2?

Message 1 of 4
(2,530 Views)

How did you move the file?  Was the file in a virtual folder in your project?

 

If you are going to move code around, you really should do it from the LabVIEW IDE.  File->Save As.  Then choose "Rename" and put it where you want it.  All of the code linking to it will then be updated.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 4
(2,524 Views)

The file is contained in libraries that were updated in another project.  When I updated to the latest libraries, the file was effectively moved by the source control package.

 

While what you suggest would work for an isolated case, it doesn't work for files which are shared across multiple projects.  If the move is performed in Project A, and the libraries are then updated to match in Project B, there is no way to perform the move in the LV IDE for Project B.

 

In any case, your suggestion doesn't answer the pertinent question - which is how to properly replace a stale dependency.   Clearly that feature would be useful in other cases where your suggestion is not possible to implement (i.e. what if I simply have a new VI or typedef that I want to replace an old one?)

 

 

0 Kudos
Message 3 of 4
(2,511 Views)

Did you add the type def to the project?  Not just the dependencies.  But part of the actual project.  I would imagine that should cause a conflict if VIs are still looking for a type def of the same name in a different location.  You then just have to resolve the conflicts.  There is a nice little button in the project toolbar to do that.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 4 of 4
(2,492 Views)