Showing results for 
Search instead for 
Did you mean: 

Creating .VI file programmatically, still owned by .LVLIB?

I have created a subVI that creates a new file by copying a template .vit file to a .vi file in a specified folder. I am including this subVI as part of a library, referenced by a .lvlib I have imported in to my project. The original .vit is not referenced by the .lvlib. It appears that the new file is somehow referenced by the .lvlib, and when I attempt to dynamically call the new vi, I get the following error: "You attempted to open a VI Server reference to an out-of-scope VI."... The error is 1390 and occurs on the "Open VI Reference" VI.  When I locate the new vi, it has a name like the following:


The LabVIEW help docs suggest using the Disconnect from Library method, which would be appropriate if I could snag a reference to that VI.


Is there a way around this?

0 Kudos
Message 1 of 3

I'd be interisted in a work-around myself.


If you don't have the password for the owning library, you are out of options.




Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 2 of 3
The library is not password protected.  I have 'solved' the problem by moving the VI that copies the file out of the lvlib, proving that creating a file from a VI that is part of a lvlib is the issue.  So, to boil down the problem:  how to create a file using a VI that is connected to a lvlib, without the new file also being connected to the lvlib?
0 Kudos
Message 3 of 3