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: 

LV 2014 Project "Save As" duplicates folder hierarchy unnecessarily.

Solved!
Go to solution

So this is my first post as a customer :P. Here we go.

 

Problem: Manually calling "Save As..." on a project results in a LabVIEW creating a folder structure at my destination where the first subfolder is "C" and then duplicates the folder structure all the way to my files.

 

Details: I have a project saved at location "x". I want to duplicate the project but NOT its dependencies. So from the project window I go to File>>Save As...>Duplicate .lvproject file and contents>Select Contents to copy. I remove all files that i do NOT want LabVIEW to copy. At this stage I notice something very odd which MAY BE A RED HERRING: There are three top level tree items representing folder hierarchies in the dialog. The first is blank. The second starts at "C" and the third starts at "c" <Note the lower case difference>.

 

When I execute the save to my target location, what I expect is ...\target location\<project source>. 

What I see is ...\target location\C\Program Files (x86)\<path to my project>\<project source>

The additional "C\Program Files (x86)\<path to my project>\" is unexpected and actually causes the file paths of my source to exceed the windows path length of 255 characters.

 

I note that this only happens with *some* projects. The attached file "Empty tree element.png" shows the first anomaly. The "Lower Case C.png" shows the second anomaly. And then "Long File Path" shows the ultimate result. 

 

Additional information: No files are missing at any point in time.

0 Kudos
Message 1 of 6
(3,280 Views)

I often got this behaviour when I wanted to copy a whole project, and then some dependences created a subfolder in the target folder mimicking a path including my /documents/ folder...

Right now I cannot remember the details, neither can test it. As I remember, once someone in the forum recommended a trick which is a nice way to copy a project: use the "Save as previous version" on the whole project, but chose the same version number (in your case LV14). I think this solved my problem...

0 Kudos
Message 2 of 6
(3,204 Views)

Hi Blokk

Unfortunately that didn't seem to help. Thanks anyways.

0 Kudos
Message 3 of 6
(3,185 Views)

I've always assumed this is expected behavior and there is some underlying reason for it.  I have to duplicate projects very rarely so I just "byte" the bullet and descend the folder trees until I hit the bottom where the files are and manually copy them back up to the top-level folder I want them in and then delete the empty trees.  It's a PITA but since these are usually old projects created by co-workers long gone and I want to restructure the whole thing anyway I just deal with it.  If anyone knows why this is the default behavior or has any better methods to duplicate a project please chime in...

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019 - Unfortunately now moving back to C#, .NET, Python due to forced change to subscription model by NI. 8^{
0 Kudos
Message 4 of 6
(3,173 Views)
Solution
Accepted by topic author Chris_Cilino

Figured it out! So here's the deal. The root problem is that I had a diagram disable structure with a missing subvi inside of it! ARRRRGHHHHHH!!!!!! This fits all of my observations. When loading the VI manually that had the missing subVIs I wasn't notified because they were in a diagram disable... so LabVIEW didn't compile them. BUT LabVIEW apparently cared enough to try and copy the subVI.

 

So when LabVIEW went to make a copy of the project, it noticed the missing subvis EVEN THOUGH THEY WERE IN A DIAGRAM DISABLE STRUCTURE. Since LabVIEW couldn't find them it created the directory structure all the way up to C.

 

I'm not sure if this is a bug, however I think that LabVIEW should do a better job, some way some how, of notifying us that it was unable to find VIs at copy time. 

 

To easily reproduce the issue simply create a new project with a vi that calls a missing subvi, wrap the subvi call in a diagram disable and then try the copy procedure I described in my first post. 

Message 5 of 6
(3,147 Views)

oops... accidentally answered this with my cirrus logic profile 🙂

0 Kudos
Message 6 of 6
(3,144 Views)