Jump to content

Creating file from .lvlib, still part of .lvlib?


Recommended Posts

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."... When I locate the new vi, it has a name like the following:

Library.lvlib:NewVI.vi

Is there a way around this?

Link to comment

What is the purpose of this code?

Do you want to load the VIs reentrantly?

If so I discourage you to use the VIT route, just drop the template VI (as .vi) inside a static VI reference on your BD and use the proper VI server methods.

Could you upload your code?

Ton

PS your question is a bit unclear, could you use names like VIa, VIb etc.?

Link to comment

The original .vit may have been saved thinking it is part of the .lvlib even though the .lvlib was saved with no reference to the .vit. Open the .vit itself in the LV editor and see if it thinks it is a member of the library. If it does, use "File >> Disconnect from Library" to separate the .vit from the .lvlib and then save the .vit. Then try your code again.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.