LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Template Inside the Template

Hi everyone,

                How to pragmatically save a template vi which has a templates inside it. When i used save instrument method it returns below error. Is there is any methos to save unsaved changes inside a VI.

Save unsaved VI's Error

Happy to Wire
0 Kudos
Message 1 of 8
(3,598 Views)

I can't try it - but I think you will have to go through the VI hierarchy to find and save any unsaved VIs working your way up to the top level VI.


LabVIEW Champion, CLA, CLED, CTD
(blog)
0 Kudos
Message 2 of 8
(3,584 Views)

Thats is my problem how to find the unsaved instance? Here i have attached test code for your reference.

Happy to Wire
0 Kudos
Message 3 of 8
(3,567 Views)

Sankar,

 

You want to save it as a template again? Anyway you need to choose the option 0*02, if you want to open a template for editing.

Test.png

0 Kudos
Message 4 of 8
(3,561 Views)

No, NanthaKumar. I want to save it as a vi file not vit file. We can use x04 method for prompt user to save but my requirement is not that.

Happy to Wire
0 Kudos
Message 5 of 8
(3,558 Views)

You can Get VI dependencies through invoke method and check whether there is any template file in it. If it has template file you can save those also.

0 Kudos
Message 6 of 8
(3,555 Views)

I have created simple vi with single index.

Test.png

0 Kudos
Message 7 of 8
(3,530 Views)

@sankar06 wrote:

Hi everyone,

                How to pragmatically save a template vi which has a templates inside it. When i used save instrument method it returns below error. Is there is any methos to save unsaved changes inside a VI.

Save unsaved VI's Error


It need to be done in 2 steps. From the template you create and save a new vi and then you save it as a new template. Finally you can delete the temporary vi that was created.

 

Ben64

 

create new template.png

0 Kudos
Message 8 of 8
(3,513 Views)