Graeme Posted August 25, 2007 Report Share Posted August 25, 2007 Hi all, I have a top level VI. It contains many (to me, ~50) sub VIs. It is a test template which can be used as a building block for producing different yet similar test applications. When a new requirement for a new application comes in, I start by renaming (usually by adding a prefix for the new job) the test template's top level VI and all its subVIs. I then have have to go through the new, renamed top level VI and tell it to point to (replace with) the new, renamed subVIs (for all ~ 50 subVIs) and not the old, original template ones. Very tedious indeed. Surely this can be done with some code? The best I've managed so far is to rename and copy my top level and subVIs, but of course, the renamed and copied top level VI still points to the original subVIs. How can I get it to point to the newly renamed and copied subVIs? I attach a VI that is my sum achievement to date. Awaiting inspiration, Graeme. Quote Link to comment
PJM_labview Posted August 25, 2007 Report Share Posted August 25, 2007 Download VIPM and install this package ogrsc_rename_folder_of_vis. This install under your file menu a great utility to move rename ("instanciate for your case") folder of VIs. http://forums.lavag.org/index.php?act=attach&type=post&id=6747 PJM Quote Link to comment
Grampa_of_Oliva_n_Eden Posted August 25, 2007 Report Share Posted August 25, 2007 QUOTE(PJM_labview @ Aug 23 2007, 08:43 PM) Download VIPM and install this package ogrsc_rename_folder_of_vis.This will install under your File menu a great utility to rename ("instanciate for your case") a folder of VIs. Check it out, you won't be disappointed! PJM Nice! How can I knock an idea like that after i wrote a similar VI. While mine alos does the cloning and adding a prefix it does not allow specifying an existing prefix. On the other hand, mine support morphing durring the cloning by which I mean it will replace all instances of one object (VI or ctl) while doing the morphing. The trick to cloning (manually or programatically) is saving "from the bottom up" and therein lies the challenge of writing a cloner. For this work I used the "callers" and "callees" properties and reshuffled the list as indicated. I will not post mine because it has a "face only a mother could love". Nice PJM! Ben Quote Link to comment
Ale914 Posted August 25, 2007 Report Share Posted August 25, 2007 QUOTE(PJM_labview @ Aug 23 2007, 07:43 PM) Download VIPM and install this package ogrsc_rename_folder_of_vis.This will install under your File menu a great utility to rename ("instanciate for your case") a folder of VIs. Check it out, you won't be disappointed! PJM PJM is this package also "relink" all the project VI, after change the name? Actually i used tool from Martin Vernhout, martin.vernhout@philips.com, lvdevtools.sourceforge.net and its work very well Ciao Quote Link to comment
PJM_labview Posted August 25, 2007 Report Share Posted August 25, 2007 QUOTE(Ben @ Aug 24 2007, 05:22 AM) Nice PJM! Thanks, but I had nothing to do with it. Jim (Kring) wrote it. QUOTE(Ale914 @ Aug 24 2007, 06:26 AM) PJM is this package also "relink" all the project VI, after change the name? Yes, after you renamed your folder, everything in it has been relinked of course (it would not be very useful otherwise). PJM Quote Link to comment
Graeme Posted October 5, 2007 Author Report Share Posted October 5, 2007 PJM_labview, Many thanks for your postings to my topic and my deepest apologies for the outrageous delay in replying to you. Pressure of work and other LabVIEW projects have side-tracked me, but I hadn't forgotten the issue. Only this evening (well evening in the UK) have I had a chance to seriously look at your solution. However, I can't get it to work for me. Undoubtably operator error, of course. I was hoping if you, or others, might enlighten me. I've tried to attach a .png which shows the error message I see. I've not tried this before so if it all goes wrong, apologies and I'll re-post with something else. Many thanks again. Regards, Graeme. Quote Link to comment
Graeme Posted November 8, 2007 Author Report Share Posted November 8, 2007 After much thrashing around I've come up with something that does exactly what I want. It's a bit rough and ready, though, but demonstrates the principle. I'm posting it to see what others think. Hopefully, it might be of use to others too, even if only as a basis for something better. Constructive criticism most welcome. Regards, Graeme. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.