LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to replace a whole class?

Hello,

 

What is the best and fastest way to replace a whole LabView class by another one?

 

I have developed an application based using a LV class. Then I have copied the class to a new location and improved it and I have developed new VIs in the copied class. Now I would like to bring that class back to the application with a simple "replace with...". But in the context menu it is grayed out.

 

The reason why I copied the class to a new location is that I wanted to keep a running version of my project and to make some minor changes in the main VI. The changes in the LV class took more time and where some basic changes in concept but without affecting the names and the connector of the subVIs. So a simple replace all VI would do. Does anyone knows whether there is such a tool? Or how do I perform this?

 

Regards, Jörn

0 Kudos
Message 1 of 5
(3,107 Views)

Hi Jörn,

 

if you just want to search and replace a SubVI you can use Ctrl + F or Edit > Find and Replace in your block diagram.

 

Further in formation on how to replace/rename classes is here: Preserving LabVIEW Class Data

 

Let me know if that helps,

 

Regards

Andreas Stark
LabVIEW Lead @ Rocket Factory Augsburg
0 Kudos
Message 2 of 5
(3,070 Views)

I am aware of changing a SubVI with Find and Replace. But the class which I have created consists of about 40 VIs whereby some of them are used about 10 times in the main program. So changing them manually takes some awful time. (The last time when I tried to do it this way LabView 8.6 crashed multiple times so I need to spend this awful time repeatedly.) While replacing the VIs of one class by the VIs of the new class both classes get mixed up. Easily VIs of the old class get overwritten by mistake. 

 

Do you think it is reasonable to

1. change inheritance to make the old class an ancestor of the new class

2. change the class Ctls (which by the way cannot be searched using CTRL + F) from ancestor/old class to child/new class

3. save the main VI

4. undo the inheritance

?

 

Regards, Jörn

0 Kudos
Message 3 of 5
(3,062 Views)

Dear Andreas,

 

the recommended link was good but I doesn't helped me to solve my wish. It describes the behaviour of LV but gives no description how to replace a whole class.

 

 

Regards, Jörn

0 Kudos
Message 4 of 5
(3,051 Views)

Hi Jörn,

 

I was playing around with classes for a while and the solution I found is renaming old Versions of the class to a different name. For a roll-back the old version gets renamed back to its original name.

 

Another idea would be to put the class into a lvlib to avoid conflicts.

 

But the best solution is using versioning control: 

Source Code Control and Group Development Practices in LabVIEW for Advanced Configuration Management...

As provider you could use perforce which is free for 2 users and 5 clients.

 

Let me know if that helps.

Andreas Stark
LabVIEW Lead @ Rocket Factory Augsburg
0 Kudos
Message 5 of 5
(3,042 Views)