LabVIEW Project Providers

cancel
Showing results for 
Search instead for 
Did you mean: 

Add VI to LVLIB, open FP, then save manually. Saving problem

Solved!
Go to solution

I created a project provider that adds a VI to a LVLIB. After adding, FP of the VI is opened. User should modify the VI (for example add controls to FP) then save it.

 

For some obscure reason the VI is not saved. Right-click on the LVLIB opens pop-up menu, then a VI is added and FP is opened. However, any changes in this FP cannot be saved.

 

What do I do wrong?

 

This is LabVIEW code localising the problem. It adds a VI with unique name to existing LVLIB in the open project.

 

Code adding VI:

 Add_VI.png

 

Obtaining reference to the LVLIB:

 

Y_TEST_Item_OnCommand.png

 

 

I tried to call the same VI-adding code manually. This is code which can be opened and run. No problem with saving in this case.

 

Y_TEST_MANUAL.png

 

What do I do wrong? Please advice.

Thank you

 

The whole code is attached

 

 

_____________________________________
www.azinterface.net - Interface-based multiple inheritance for LabVIEW OOP
0 Kudos
Message 1 of 3
(1,496 Views)
Solution
Accepted by topic author _Y_

The NewVI call creates the VI in the wrong application instance.

Wire the project Application instance into the NewVI call.

 

Message 2 of 3
(1,454 Views)

Thank you! It works!

 

If someone needs more details:

I get ref to Project from the Library then ref to Application from the Project.

_____________________________________
www.azinterface.net - Interface-based multiple inheritance for LabVIEW OOP
0 Kudos
Message 3 of 3
(1,444 Views)