LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

rebuild "save instrument and callers" Scripting

Solved!
Go to solution

Hello All, in simple I am trying to implement this VI from five years ago:
https://decibel.ni.com/content/message/18955

 

Why am I doing this?

Spoiler
I have to rename A large number of SubVIs in one go, and a manual solution is going to take longer than taking a day to solve this. Simply re-naming the VIs causes bad links in my VI hierarchy, which also require manual linking (defeating the purpose of automating this).

However I cannot replicate the behavior in his screen shot, specifically the Invoke node 'Save.Instrument and Callers Debug'.

Without this, Any subVIs saved by my method are unlinked from their parent VIs.

 

Is this a case of removed functionality or just hard to get at? Any other idea on how to rename SubVIs without breaking the links to Parent VIs?

 save+as.jpg

Above the 2010 screenshot of the save.instrument invoke node. Bellow my code.

forum post.png

 

When A solution is found, or after a few days of attempts this line will be replaced with my results...

 

0 Kudos
Message 1 of 3
(3,497 Views)

I believe your question may have been answered on this thread.  

 

Specifically imaginatics answer:

"The other simpler way to do this is just to do your save-as new-name.vi starting from the bottom of your VI hierarchy and work to the top.  If you rename a VI with it open, (not just rename in the operating system), then LabVIEW updates the callers, then when you rename and save them the already have the dependency reference changes for their subVIs, etc, etc til you save the topmost VI last." 

0 Kudos
Message 2 of 3
(3,441 Views)
Solution
Accepted by topic author joesze

@joesze wrote:

 

Is this a case of removed functionality or just hard to get at?

 save+as.jpg

 


The blue header indicates it's a private method, so it's hidden and you can't get to it. As suggested, the preferred option is to recursively traverse the hierarchy from the top level VI down (using the VI's Callees[] property) and then do save as from the bottom up (and I would suggest once more over all VIs at the end in case you have weird dependencies). Also, if you have VIs in libraries be sure to save those.


___________________
Try to take over the world!
0 Kudos
Message 3 of 3
(3,428 Views)