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:
Obtaining reference to the LVLIB:
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.
What do I do wrong? Please advice.
The whole code is attached
Solved! Go to Solution.
The NewVI call creates the VI in the wrong application instance.
Wire the project Application instance into the NewVI call.
Thank you! It works!
If someone needs more details:
I get ref to Project from the Library then ref to Application from the Project.