malani Posted December 30, 2008 Report Share Posted December 30, 2008 Good Day , I am in need to Know Method to Rename Selected VIs In a large Folder. This Should Be Similar to Save as ,Substitute Copy For Original In Run Time Menu. Thanks in Advance, Malani Quote Link to comment
LAVA 1.0 Content Posted December 30, 2008 Report Share Posted December 30, 2008 Hi Malani, your question is a bit unclear, but I would have a look at the 'Save Instrument' method. Ton Quote Link to comment
jgcode Posted December 30, 2008 Report Share Posted December 30, 2008 QUOTE (Ton @ Dec 29 2008, 03:45 PM) Hi Malani,your question is a bit unclear, but I would have a look at the 'http://zone.ni.com/reference/en-XX/help/371361D-01/lvprop/vi_sve_instrument/' target="_blank">Save Instrument' method. Ton You can do it manually as Ton suggested or there is an Open G install by Jim Kring called Rename Folder of VIs that will install into your LabVIEW runtime menu. Quote Link to comment
malani Posted December 30, 2008 Author Report Share Posted December 30, 2008 QUOTE (Ton @ Dec 29 2008, 12:15 PM) Hi Malani,your question is a bit unclear, but I would have a look at the 'http://zone.ni.com/reference/en-XX/help/371361D-01/lvprop/vi_sve_instrument/' target="_blank">Save Instrument' method. Ton Ton, I am Trying to Rename the VIs Dynamically Using Scripting Renaming by using Save Instrument is Similar to File-->Save AS-->Create Unopened Disk Copy. But I am Looking for some thing similar to File-->Save AS-->Substitute copy for Original . As by using Save Instrument and deleting the Original Copy I was able to Acheive the Functionality but I Think That is In efficient. So I am Looking for some other Algo or Functions In LabVIEW Thanks Ton, Malani Quote Link to comment
Rolf Kalbermatter Posted December 30, 2008 Report Share Posted December 30, 2008 QUOTE (malani @ Dec 29 2008, 08:06 AM) Ton, I am Trying to Rename the VIs Dynamically Using Scripting Renaming by using Save Instrument is Similar to File-->Save AS-->Create Unopened Disk Copy. But I am Looking for some thing similar to File-->Save AS-->Substitute copy for Original . As by using Save Instrument and deleting the Original Copy I was able to Acheive the Functionality but I Think That is In efficient. So I am Looking for some other Algo or Functions In LabVIEW What is inefficient about that? It's exactly how the Substitute copy for Original is implemented only without the delete afterwards as the original file remains on disk. You do need to think about feelings you have. Just because something does feel inefficient does not mean it has to be so. If it works and does what you want, why going to try to make a supergalactic solution instead? Not even a NASA budget could help you there Rolf Kalbermatter Quote Link to comment
Aristos Queue Posted December 30, 2008 Report Share Posted December 30, 2008 QUOTE (rolfk @ Dec 29 2008, 08:00 AM) What is inefficient about that? Actually, believe it or not, Malani's suspicion is correct Rolf... it is inefficient. It also is not the same functionality.Let's handle the difference in functionality first: Save As: Substitute Copy For Original will cause any VI currently in memory that calls the renamed VI to be updated to point at the new name. Save As: Create Unopened Disk Copy will NOT redirect the caller VIs. I assume that in Malani's case there are no callers for the VI he is renaming, thus the functionality appears to be the same. But I want to make sure he/she is aware of the functionality difference just in case it matters in some future application. As for the efficiency: Save As is accomplished by renaming the VI in memory and then saving the resulting VI. When we do Save As: Create Unopened Disk Copy, we rename the VI in memory to the new name/path, save it, and then rename it back to the original name. That's the inefficiency -- if you're just going to take this VI out of memory, then it is better to leave it as the new name, which is what happens when we do Save As: Substitute Copy For Original. The reason we do the rename is to make sure any circular references correctly update and/or break. Milani: You should be able to get the functionality you want like this: http://lavag.org/old_files/monthly_12_2008/post-5877-1230591271.png' target="_blank"> Quote Link to comment
Variant Posted January 3, 2009 Report Share Posted January 3, 2009 QUOTE (rolfk @ Dec 29 2008, 02:00 PM) What is inefficient about that? It's exactly how the Substitute copy for Original is implemented only without the delete afterwards as the original file remains on disk.You do need to think about feelings you have. Just because something does feel inefficient does not mean it has to be so. If it works and does what you want, why going to try to make a supergalactic solution instead? Not even a NASA budget could help you there Rolf Kalbermatter The advantage of substitute fir orginal copy is, I will get relinked in all the instances that are there in memory so, He just has to open the top level and Save all the VIs in memory or else he need to play with the VI Refnum and relink @ every instance Quote Link to comment
LAVA 1.0 Content Posted January 3, 2009 Report Share Posted January 3, 2009 QUOTE (Variant @ Jan 2 2009, 09:52 PM) The advantage of substitute fir orginal copy is, I will get relinked in all the instances that are there in memory so, He just has to open the top level and Save all the VIs in memory or else he need to play with the VI Refnum and relink @ every instance Save Instrument, will link all items in memory to the new path, you only have to resave them (just as the menu option). Ton Quote Link to comment
malani Posted January 7, 2009 Author Report Share Posted January 7, 2009 Thanks for All your Suggestions Now Renaming all the VI in Folder Programatically Does work fine with all your Inputs. The method save Instrument is not Inefficient But When I am Trying to Rename a Bulk of Folder I tried if any Better option is Available. Thanks, Malani 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.