Jump to content

Save Template Instance


Recommended Posts

[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

post-10325-1243008937.png?width=400

Download File:post-10325-1243008955.zip

Coded in LV8.6 and Saved for Previous Version in LV8.0.

Link to comment

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.

Link to comment

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:

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.