Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   NI LabVIEW (http://www.chiefdelphi.com/forums/forumdisplay.php?f=182)
-   -   Error: This VI claims to be part of a library (http://www.chiefdelphi.com/forums/showthread.php?t=81317)

Doc Wu 28-01-2010 00:10

Error: This VI claims to be part of a library
 
Okay, I had such a productive day at school, that I just had to go home and screw something up...

I tried to make a copy of the HolonomicDrive.vi so that I could modify it without messing up the original. Somehow I got things messed up and keep getting this error:

Code:

This VI claims to be part of a library, but that library does not claim to own this VI
The explanation in the error detail isn't much help. Does anyone know how to correct this? I'm not even sure if this is an error in the project, or if I've screwed up the whole VI libraries for labView...

Greg McKaskle 28-01-2010 07:52

Re: Error: This VI claims to be part of a library
 
Like most computer error, it makes perfect sense once you know what it means.

Libraries provide namespace and scoping to VIs. You don't have to use them to use LV, but WPILib is making use of them. Once you've defined a library, the VIs are owned and managed by the library, and will complain like this if you attempt to rip them out and use the file away from its library. When you made a copy, presumably a file copy, your file inherited this library ownership -- which you probably want by the way.

The fix you probably want is to open the library and add this VI to it, just like the original one was. Then, once the VI says it belongs to the Library, and the Library claims to own the VI, everything will be happy and the error will go away. To avoid this, in the future, I believe it will work better to do a Save As so that LV will update the library too.

Post again if you need help finding the library or making the edit.

Greg McKaskle

Joe Ross 28-01-2010 09:44

Re: Error: This VI claims to be part of a library
 
Quote:

Originally Posted by Greg McKaskle (Post 908388)
The fix you probably want is to open the library and add this VI to it, just like the original one was. Then, once the VI says it belongs to the Library, and the Library claims to own the VI, everything will be happy and the error will go away. To avoid this, in the future, I believe it will work better to do a Save As so that LV will update the library too.

Won't this have to be done every time that there is a LabVIEW update? That seems harder then it should be.

Doc Wu 28-01-2010 14:11

Re: Error: This VI claims to be part of a library
 
Quote:

Originally Posted by Greg McKaskle (Post 908388)
Like most computer error, it makes perfect sense once you know what it means.

-snip-

The fix you probably want is to open the library and add this VI to it, just like the original one was. Then, once the VI says it belongs to the Library, and the Library claims to own the VI, everything will be happy and the error will go away. To avoid this, in the future, I believe it will work better to do a Save As so that LV will update the library too.

True. It does make sense, even from just reading the error message, but I can't find anything about libraries or adding VIs back into them. I've searched through menus, right-clicked all over the place, gone back to the LV opening screen and can't find anything to do it or reassign a VI to a library.

The "Save As" dialog is probably the root of the problem. It is so complex and confusing that you're bound to make a mistake when attempting to copy anything using it. That's where this started, when I tried to make a copy of the VI - with a unique name - so I could customize it. Now neither the copy nor the original works.

Anyway, I fixed the problem by brute force, by copying the entire vi.lib folder from another computer (an installation only a couple days old) and replacing the whole folder. (Beware of copying into restricted directories in Windows Vista/7, you have to do it as Administrator, or else it puts them in your User folder - even with a user with admin privileges - and makes it look like they are where you copied them. I was suspicious that there was no "Overwrite existing file" message at first, then realized that was happening.)

Greg McKaskle 28-01-2010 19:41

Re: Error: This VI claims to be part of a library
 
I'm not certain what the installer would do if you change the file but NI doesn't. But in general, modifying a file, in this case a library is not as robust as extending it by making your own library which wraps the current one and adds the new function. Or if the function doesn't need to access private elements, just add it on top of the library and don't add it.

As for updating the library, I don't love the Save As dialog either, but I'm pretty sure it does work. Glad you found a way to get it going.

Greg McKaskle


All times are GMT -5. The time now is 11:59.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi