jgcode Posted May 23, 2009 Report Share Posted May 23, 2009 [Cross-posted to NI Forums] Hi I have VITs that call other VITs or CTTs in some of my templates. I want to programmatically open a reference to a template and save the new VIs/CTLs to disk but I am getting errors My code works fine for any VIs or VITs that only call other VIs or CTLs. However if the VI or VIT contains calls to other VITs or CTTs then it fails. When I try to get a reference to the new VI or CTL in memory the reference seems dead? Can anyone point me in the right direction? Cheers JG Download File:post-10325-1243008955.zip Coded in LV8.6 and Saved for Previous Version in LV8.0. Quote Link to comment
candidus Posted May 26, 2009 Report Share Posted May 26, 2009 Hi, the error message contains useful information about the problem: --- LabVIEW: One or more untitled subVIs exist. This file cannot be saved until all dependent files have been named. Method Name: Save:Instrument --- When you instantiate your VIT it instantiates the templates it owns. You can't save your template instance before you save its callees. Rewiring of the "Build Array" primitive puts things in right order: First the callee, last the calling VIT instance. Quote Link to comment
jgcode Posted May 26, 2009 Author Report Share Posted May 26, 2009 QUOTE (candidus @ May 25 2009, 05:19 PM) Hi,the error message contains useful information about the problem: --- LabVIEW: One or more untitled subVIs exist. This file cannot be saved until all dependent files have been named. Method Name: Save:Instrument --- When you instantiate your VIT it instantiates the templates it owns. You can't save your template instance before you save its callees. Rewiring of the "Build Array" primitive puts things in right order: First the callee, last the calling VIT instance. I didn't try that (obviously) I didn't think the order would matter as long as I kept the reference open. This worked for standard VIs but not ones that called .vit/.ctt files Thank you so much for posting! Cheers! :beer: Quote Link to comment
candidus Posted May 26, 2009 Report Share Posted May 26, 2009 You're welcome. I'm happy to hear that I could help. 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.