LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Regenerate project dependencies

Solved!
Go to solution

It seems to me there ought to be a way to request or force LabVIEW to regenerate the references between the files of a project.  I've tried the steps listed below (and less complicated versions of them) but somehow dependencies from the original project always seem to find their way into the new project and create a ton of dependency warnings (see image below).  I know how to fix these but before I finish resolving all of them, LabVIEW inevitably starts hanging or crashing repeatedly making it impossible to fix them all.  Please let me know how I can solve this problem.

 

  1. Move all folders containing any copies of any and all previously saved project files to an obscure location outside of the path "C:\Project Files (x86)\National Instruments".
  2. Copy only files ending in ".vi" or ".ctl" to a newly created folder in "C:\Project Files (x86)\National Instruments\LabVIEW 202\project"
  3. Reboot computer.
  4. Launch LabVIEW.
  5. Create new blank project and save it in the newly created folder.
  6. Add the file types mentioned above using "Add Folder (Snapshot)"

 

I have tried these steps without deleting the LabVIEW.ini file and after deleting LabVIEW.ini.  Either way I get the same result described above.

 

project dependency warningsproject dependency warnings

 

0 Kudos
Message 1 of 8
(2,548 Views)

Backup your lvproj file, then open it in a texteditor and remove the <Item Name="Dependencies" Type="Dependencies"> (until the correct </Item>)

Reopen project and it should regenerate them. It's possible you must keep the Dependencies tag but remove all items within it.

You can also make a small VI that does just that. 🙂

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 2 of 8
(2,497 Views)

Thanks Yamaeda,  that's very helpful.  I should have looked there.

 

But now I have another issue that I've seen a few times before.  As I work on a section of dependency warnings, each time I resolve the one on top, it disappears for a second or two and then reappears at the bottom of the list (see the image below).  What am I doing wrong?

 

boomerang dependency warningsboomerang dependency warnings

0 Kudos
Message 3 of 8
(2,487 Views)

The "Why is this in dependance" is very helpful. Use Replace with the correct one from inside those VIs.

It's also useful to switch to Files view instead of the standard Items view in the project, that way you can which files are used instead.

It's quite aweful when a project gets stuck in that shape, i've done that exact cleaing the last few weeks.

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
Message 4 of 8
(2,463 Views)

@Yamaeda wrote:

The "Why is this in dependance" is very helpful. Use Replace with the correct one from inside those VIs.

It's also useful to switch to Files view instead of the standard Items view in the project, that way you can which files are used instead.

It's quite aweful when a project gets stuck in that shape, i've done that exact cleaing the last few weeks.


I also find it useful to show file paths in the project because it will make it very easy to spot things that are "in the wrong place".  Usually it's a file you put in the right library but in the wrong folder, but it can also help you spot files that are being loaded from the wrong place.  Your brain is very good at noticing variations from a pattern and if all your files have the same path except one, it will notice that right away.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
Message 5 of 8
(2,455 Views)
Solution
Accepted by topic author skinnedknuckles

This has happened to me, as well.  Being largely a "solo" developer, my Projects tend to be organized in a single Project Folder, with sub-Folders for major sections (such as Host and Target for LabVIEW RT code, with sub-folders for major sections of the code, where applicable, such as Data Acquisition, Data Analysis, Common (routines shared by Host and Target, for example), with further sub-divisions into Sub-VIs and Types.

 

I use Subversion as my VCS, and try to have only a single Working Copy around.  Recently, I've had a few colleagues who don't use Subversion (I'm working hard to change this), and dealing with multiple Versions is a real pain, and has caused similar Project messups.

 

Some of the techniques I've used include:

  • "Hiding" other Project folders.  Before opening a Project, ensure all other Project paths with "different version content" have been renamed.  Sometimes this involves creating a "Folder-folder" called "Hidden Versions" and moving all other Projects with the same .lvproj file into hiding, and not working on them.
  • An "extreme" form of Hiding is to stash them in a VM.  Sometimes when doing "How does this Project differ from all other Projects", I'll conduct the entire investigation on a VM (or even a copy of the VM) to avoid compromising the main Project.
  • I've only had to do this once or twice, but if all else fails, get all of the Files and Folders "organized" (which really means "identified", and in my case, "located in what will become the Project Folder), delete the .lvproj file that is inside the Project Folder (but not before copying such things as Build Specifications, Project properties, specifications for RT Targets, etc. to paper, and saving a copy of the .lvproj file "somewhere else", preferably with a different name).
  • A "different name" system that I use is to put " H" after the name, H as in "Hidden".  That usually seems to prevent LabVIEW from finding the original version (I've also used "Orig" as the final name piece).
  • In the Project Menu-bar choice, I enable "Show Items Path", and under "Filter View", I turn on both "Dependencies" and "Build Specs".  It might be a good idea to take a screen-shot of Dependencies.  Be sure that you don't have any files in Dependencies that you "expect" to see in your Project view.
  • To start the "Rebuild from Scratch", create a New Project either as a "Blank Project" or "Blank RT Project".  For RT, add the RT Target or Device.  Since I don't build my own VI Libraries, my Project Folder in Project View basically matches the Project Folder in "File" View.  So I place the Files and Folders I will use in the Project inside the newly-created Project Folder.  I then "Add" all of these folders to the Project.  Most of the time, this largely "regenerates" the Project File without errors.

Bob Schor

The other 

Message 6 of 8
(2,443 Views)

Thank you Yamaeda, billko and Bob for your insights.   I was able to work my way out of the quicksand using many of your suggestions.  I originally created my project with a 64-bit version of LabVIEW but missing drivers forced me to switch to the 32-bit version and it seems many 64-bit references came along for the ride which is probably okay for VI references but not for libraries.  I also noticed that LabVIEW.ini saves a bunch of directory paths which may explain how old references kept returning.  I think clearing all those paths from Labview.ini before generating my new project may have helped too.  The ".llb" libraries were nice to add because they allowed me to select only the few VIs I needed rather than adding all of them which can be create hundreds of references for some libraries.

 

selecting library filesselecting library files

Message 7 of 8
(2,433 Views)

@Bob_Schor wrote:

Some of the techniques I've used include:

  • "Hiding" other Project folders.  Before opening a Project, ensure all other Project paths with "different version content" have been renamed.  Sometimes this involves creating a "Folder-folder" called "Hidden Versions" and moving all other Projects with the same .lvproj file into hiding, and not working on them.
  • An "extreme" form of Hiding is to stash them in a VM.  Sometimes when doing "How does this Project differ from all other Projects", I'll conduct the entire investigation on a VM (or even a copy of the VM) to avoid compromising the main Project.
  • I've only had to do this once or twice, but if all else fails, get all of the Files and Folders "organized" (which really means "identified", and in my case, "located in what will become the Project Folder), delete the .lvproj file that is inside the Project Folder (but not before copying such things as Build Specifications, Project properties, specifications for RT Targets, etc. to paper, and saving a copy of the .lvproj file "somewhere else", preferably with a different name).
  • A "different name" system that I use is to put " H" after the name, H as in "Hidden".  That usually seems to prevent LabVIEW from finding the original version (I've also used "Orig" as the final name piece).
  • In the Project Menu-bar choice, I enable "Show Items Path", and under "Filter View", I turn on both "Dependencies" and "Build Specs".  It might be a good idea to take a screen-shot of Dependencies.  Be sure that you don't have any files in Dependencies that you "expect" to see in your Project view.
  • To start the "Rebuild from Scratch", create a New Project either as a "Blank Project" or "Blank RT Project".  For RT, add the RT Target or Device.  Since I don't build my own VI Libraries, my Project Folder in Project View basically matches the Project Folder in "File" View.  So I place the Files and Folders I will use in the Project inside the newly-created Project Folder.  I then "Add" all of these folders to the Project.  Most of the time, this largely "regenerates" the Project File without errors. 

Good ones! Apart from the Show item path (i'll have to look into that) i use them all, and i'd like to add Zip as a way to hide files.

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 8 of 8
(2,378 Views)