LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to copy project hierarchy?

This is one of my most annoying problem with managing projects in LV.
very often i want to change the hierarchy of subvis in my project, to belong to different folders. making the similar change physically in the HD induces the project to disconnect from the subvi, and i have to search it specifically. ok one time, but very annoying more than that.
 
i tried  to create a new source distribution (single destination - preserve hierarchy), but it copies the HD hierarchy, not the project one.
 
So, i would create a little tool to do it myself, if i could get the info of the project hierarchy somehow. any idea?
 
-----------------------------------------------------------------------------------------------------
... And here's where I keep assorted lengths of wires...
0 Kudos
Message 1 of 11
(4,602 Views)
Well I didn't use it a lot, but you can access project properties/methods. I don't really know how powerful it is, I just used it to programmatically build applications. Best thing is to try it out. Problem is the missing documentation (or at least I couldn't find anything useful).

You can start with the programmatic build example here or the help page here.

Good luck Smiley Wink


0 Kudos
Message 2 of 11
(4,596 Views)

Hi Gabi,

The Project has not been around very long but it is generally recomended that the Proj structure should match the HD.

Since I organize my stuff that way the Source Distribution satisfies my needs.

Can you please elaborate?

Although i haven't written anything yet, it appears all of the properties you need are available.

Trying to help,

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 3 of 11
(4,582 Views)

Dan thanks i was just trying that, but got over my head, since in the new project i still have to tell where every subvi is physically. just the copying to a new directory doesnt update the info in the project explorer. so problem not yet solved.

Ben - yes i begin by arranging all in the HD and create the project from that. yet, sometimes in the project, as it evolves, i add folders, and want to rearrange subvis to be in other folders. then, easy would be to copy directly the new hierarchy to a new place, and it would then match -project to HD.

right now my only solution is 'save as-substitute original' of every subvi that change place in the project, to make it match the HD, with the ensuing enormous mess in my HD. then, i build specs to new location, and everything ok.

-----------------------------------------------------------------------------------------------------
... And here's where I keep assorted lengths of wires...
0 Kudos
Message 4 of 11
(4,575 Views)
Maybe to be rag, why care?

Since the LVProject I only care that everything is beneath some root (VSS likes that)

The project is my guideline for managing items, i hardly look at the HD.

Ton
Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 5 of 11
(4,570 Views)

Try...

1) Find the top sub-VI that you want to move and do a source distribution to get into a clean form.

2) Close all VIs.

3) Open the top level VI you produced in step #1.

4) Open the top level VI of your app (Tree.VI). LV will load the sub-VI's from the new location.

5) Save all.

6) Source distribution of entire app to fresh folder.

7) Delete everything from the original folder.

😎 Move the code from step #6 back to the original folder.

All of the orphans should be gone and your code organized as you like. Update the project to match the HD.

Not sure if that helps you!

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 6 of 11
(4,570 Views)
Have you ever thought of using "Rename"? I open the VI from the project folder then Save As...>>Rename. You can rename the VI in the current folder or just select a new folder and do not rename the VI. This will move the VI on the disk but not in the project. You have to either move the VI in the project or delete it in the project and let LV recreate the project for you as you do at startup.

The only thing I do not like is that the VI file will get a new timestamp. It seems that it has not only been moved but also changed.
Waldemar

Using 7.1.1, 8.5.1, 8.6.1, 2009 on XP and RT
Don't forget to give Kudos to good answers and/or questions
0 Kudos
Message 7 of 11
(4,565 Views)

Ben thanks, yet it does not help me: doing that to every single subvi i ever moved around??

As Ton pointed out, i use the project to manage the whole thing. files get moved around all the time, and i do not care too much about what is happening on the HD, as long as i am developing. but to keep a clean copy of the project, this is impossible. (his is very useful, allow me to retrieve vis from old projects without opening their explorer to find them.

Waldemer: thats what i am doing today. but again, my projects have quite a few vis (in the few hundreds sometimes), and i cant remember which i did move. on the fly, i hate to stop my line of tough (or length of wire), to deal with these issues, so i dismiss them, until cleanup time...



Message Edited by Gabi1 on 01-04-2008 03:32 PM
-----------------------------------------------------------------------------------------------------
... And here's where I keep assorted lengths of wires...
0 Kudos
Message 8 of 11
(4,564 Views)
Try searcing i2dx posts on LAVA. I believe he posted such a tool after LV 8.0 came out.

___________________
Try to take over the world!
Message 9 of 11
(4,537 Views)
He posted it to the Code Repository.

Here it is

Ton
Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
Message 10 of 11
(4,533 Views)