LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabView class is loaded in multiple application instances

I have a PC labview project. I added a new class, then set the inheritance to be a child class. The class icon shows it is locked. The "Why is the library locked" shows "This Labview class is loaded in multiple application instances."

 

The project build spec does create 2 different applications. However the class that I added is part of only 1 app, none of its VIs are contained in the other app. The code seems to run ok. Is this an issue with locked icon? Any idea how to unlock it?

0 Kudos
Message 1 of 7
(3,526 Views)

Hi,

 

Do you have only one labview project open at the time? I would try closing everything and open just one labview project where you are using that class. Also you could try opening the labview class alone (closing LabVIEW and then only open the class). To double check that there is nothing else broken in the class.

Guillermo Oviedo
R&D Software Engineer
CLA | CTD
0 Kudos
Message 2 of 7
(3,484 Views)

Only one project is open. The funny thing is that I just closed and reopened the project and class is not locked. It comes and goes. Just annoying - not sure if I need to change anything.

0 Kudos
Message 3 of 7
(3,472 Views)

I have noticed that this also happens when you break something in the class, for example, when you are in the process of creating an accessor, and you get an error like the datatype doesn't match, or also errors with dynamic dispatch terminals in different connector panes, etc.

 

Guillermo Oviedo
R&D Software Engineer
CLA | CTD
0 Kudos
Message 4 of 7
(3,462 Views)

The following resolved the issue for me:

  1. Open up the relevant LabVIEW project and navigate to the class that is locked
  2. Right click class >> Explore >> open the class from disk 
  3. The class should no longer be locked in the project
  4. Save everything
Brad S. | National Instruments | CLA
0 Kudos
Message 5 of 7
(2,257 Views)

@davidhi wrote:

Only one project is open. The funny thing is that I just closed and reopened the project and class is not locked. It comes and goes. Just annoying - not sure if I need to change anything.


Are you spawning any background tasks (asynchronous VI calls) or using Actor Framework? If so, are you sure that all of the background tasks or actors are getting shutdown properly? If there is a background tasks running that uses the class the class will remain locked until that tasks stops? One way, at least with actors, that you can see this is that when you close the project it will prompt you that all background tasks will be stopped.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 6 of 7
(2,247 Views)

I did not know I was going to revive a 2 year old thread :-), only tried to add more things for folks to try when I had the same issue.  

Brad S. | National Instruments | CLA
0 Kudos
Message 7 of 7
(2,238 Views)