LabVIEW Project Providers

Reply
This is an open group. Sign in and click the "Join Group" button to become a group member and start posting.
Highlighted
Solved! Go to solution

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

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
(378 Views)
2 REPLIES
Solution
Accepted by topic author _Y_
11-28-2017 11:26 AM

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

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

Wire the project Application instance into the NewVI call.

 

Message 2 of 3
(336 Views)

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

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
(326 Views)
Reply
This is an open group. Sign in and click the "Join Group" button to become a group member and start posting.