From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW Project Providers

cancel
Showing results for 
Search instead for 
Did you mean: 

A secondary project provider to drag and drop a method from one class to another with all the required modifications?

Is it possible to create a secondary project provider for a type "VI" ({D60740D6-F254-4BBC-5675-8858F35B810E}) which would allow to copy/move a method from one class to another by drag and drop (currently LabVIEW does not allow that)? Apparently after copying a method VI from one class to another we want such a script to do the following:

 

1. Change the control and indicator connected respectively to the top left and top right terminals of the connector pane (class/reference in and class/reference out) to the target class type

2. At least try to replace calls of other source class methods with the corresponding methods of the target class. Well if they exist in the target class too, of course. Otherwise, let those calls become "question marks" (subvi not found).

3. Modify the target .lvclass file accordingly to include the new method as a member of the target class (and, of course, remove it from the source class .lvclass file if it is a move rather than a copy). Maybe instead of modifying the text in/of the .lvclass files directly, you can somehow tell LabVIEW to do it (accept a new method into the new class and remove it from the source class if needed).

 

I am surprised that nobody has implemented such a... "feature"/"add on"/"utility" yet, many years after introducing LVOOP. Or has somebody?

 

 
Message 1 of 2
(1,469 Views)

I haven't had to do this much, but if you drag the method VI out of the original class elsewhere in the project, then drag it again into the new class, does it handle a lot of this already? It adds a second drag to what you've described, and probably won't replace other calls with calls from the new class, so your idea could still be useful.

0 Kudos
Message 2 of 2
(1,447 Views)