I've a project with a lot of typedefs which is used as a shared variable.
Most of the time (all of the time?) when i change one of those typedefs and save it, I am not able to change it again. LabVIEW reports:
"This VI cannot be changed to edit mode. This VI is locked because it defines the data type of a shared variable that is in a locked library. To determine why the library is locked, right-click the library and select "Why is this Library Locked?"
But as far as I can see, the library in the project explorer is not locked. The only solution I have found is to close the project, an re-open it (!!!).
Anyone got a suggestion to what to do?
what did you get when you follow the advice to "check why the library is locked"?
Just an idea: As the term "shared variable" is mentioned in the error message that SV maybe is already distributed (aka "active"/"in use") and you need to stop this shared variable before you can change its datatype. Stopping is (probably) done by closing the project and so unloading all its parts from memory…
There is at least two reasons a library locks: 1) something the library owns is running, 2) the library is open in two or more application instances.
I would take GerdW's suggestion and right click on the library to get some idea which one of these it is.
I have also seen a locked library when the library is already loaded and is trying to be loaded from elsewhere (a conflict). Is there a library listed in your dependencies that is in conflict?
I finally figured something out thanks to all of your suggestions.
In my project i have 2 hardwares, a cRIO 9030 and a myRIO. The cRIO is connected, but the myRIO is hardly used, and not connected to my computer. Once I made changes to the typedef the library gets the locker symbol attatced. Right-cliking the library i get this error message:
I scrolled down to the myRIO to see whats happening, but there is no locker-symbol and no warnings or error messages.
When i saved the project, the locker-symbol disappeared from the cRIO but the typedef is still locked (?!?).
My "solution" was to remove the myRIO from the project. This somehow unlocked the typedef...
Is there a way to solve this another way? I really want both of the hardwares in the project...