LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Is there a trick to moving classes without causing project conflicts?

Solved!
Go to solution

I've been using OOP for a few months, but I've been frustrated a handful of times trying to move classes. With other files, I just go to Files View, and right-click "Move on disk" which has always worked great.

 

But if I try to move a folder containing multiple classes, or classes nested into subfolders, the project FREAKS out. It's almost like LabVIEW is moving files one at a time, but not updating all the other classes about new locations of methods, dependencies, etc. So it moves something out of order and then all the classes that relied on that file freak out, wondering where the file went.

 

Then about a thousand individual warnings pop up, and I can't dismiss them all at once. Also, conflict resolution fails to work because LabVIEW's confused about where files loaded in memory are now located on disk.

 

I've had to do source control reverts on my entire workspace to get back into a working condition. Then I usually have to move the classes over one at a time, which is a painful and frustratingly slow process.

 

Am I doing something wrong here?

0 Kudos
Message 1 of 5
(4,776 Views)

I should note that I am using LVLIBs to organize my classes, as per the recommended practices for the Actor Framework.

0 Kudos
Message 2 of 5
(4,762 Views)
Solution
Accepted by topic author Mike_Le

I have run into similar issues before. The project and library files are just text. I have moved things and edited the pathes in the project/lvlib file. Can also use a save as on the library file. Your move turns into a copy and rename operation.



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
Message 3 of 5
(4,754 Views)

Thanks Mark. I'm a little frustrated that the "Move on disk" operation doesn't handle that. Seems like it'll be a more persistent problem as more people use OOP/Actors.

0 Kudos
Message 4 of 5
(4,732 Views)

Thank you Mark! I've been struggling with this very issue and your suggestion solves my problem.

 

 

To clarify if it helps anyone else down the road, in my case I have a library that contains a parent and multiple child classes. Some functions and datatypes that belong to a child class need to be moved to the parent class. Moving the files on disk from the labview project causes conflicts that cannot resolve. I moved the files in the Items view from the child class to the parent class (while leaving the files in the same location on disk), saved the project, quit labview, moved the files with windows explorer and edited the path of the moved files in the lvclass file of the owning parent) class with a text editor.

0 Kudos
Message 5 of 5
(4,619 Views)