09-20-2016 10:35 AM - edited 09-20-2016 10:37 AM
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.
Solved! Go to Solution.
09-21-2016 12:46 AM
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...
09-21-2016 09:14 AM
Hi Blokk
Unfortunately that didn't seem to help. Thanks anyways.
09-21-2016 09:51 AM
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...
09-21-2016 12:27 PM - edited 09-21-2016 12:44 PM
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.
09-21-2016 12:29 PM
oops... accidentally answered this with my cirrus logic profile 🙂