LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to delete a VI from a project and the Hard Drive?

I cannot figure out how to delete a VI from a project that also removes it from the hard drive.

 

Selecting a VI in a project and hitting the delete key only removes it from the project but leaves it on the hard drive.  Right clicking on the VI and hitting remove does the same thing.  Holding keys like shift delete also does not work.  In fact the IDE further agitates the situation by asking me to save changes to the VI as most VI's I work with are in a class.  (Due to the VI being removed from the class)

 

Why is this a problem.  When working with a big project with many VI's and source control.  Developers end up checking in a lot of VI's that are not used.  These VI's lead to confusion when someone starts looking for something.  Maybe I just like to have things orderly on the hard drive as well.

Message 1 of 6
(3,079 Views)

That's an excellent reason why you need to do what you need to do.  However, the only way I can figure out is to do them manually.  This is how I approach the issue:

  1. From the project explorer: Right-click on the VI to delete, select "Explore..." This will open up windows explorer with the VI highlighted.
  2. From file explorer: Delete the file manually.  (Close the file explorer window, because if you do a lot of deletions and don't do this, you have a zillion file views open to go along with the zillion VIs you already have open.)
  3. From project explorer: Delete the file from the project explorer.

Sorry that all I could offer you was a workflow to what you are probably doing anyway.  😞

 

EDIT: There's all sorts of reasons to not make the deletions atomic, so you probably won't see it implemented any time soon.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 2 of 6
(3,069 Views)

If you use auto-populating folders you just delete the file from disk and the project updates appropriately but I don't use them unless I'm working on a project where the original programmer used them.

 

I follow the same workflow as Bill. Every so often I will also drag the folder containing my project source from windows explorer into my LabVIEW project. You will get some warning/error dialog letting you know that most files are already in the project but if you press okay LabVIEW mimic the folder hierarchy on disk and bring in any files that were not already in the project. I find that this lets you locate any orphaned files without too much effort.

Matt J | National Instruments | CLA
Message 3 of 6
(3,059 Views)

@Rannoch wrote:

Why is this a problem.  When working with a big project with many VI's and source control.  Developers end up checking in a lot of VI's that are not used.  These VI's lead to confusion when someone starts looking for something.  Maybe I just like to have things orderly on the hard drive as well.


I use Subversion with TortoiseSVN as source code control software. I installed TSVN Toolkit from Viewpoint System in LabVIEW, which gives you a 'Delete' option in a right click menu in the LabVIEW project explorer.

Using the 'Delete' option the VI is deleted from project explorer, deleted from hard disc and is marked for deleting from Subversion with your next commit.

Message 4 of 6
(3,037 Views)

@UliB wrote:

@Rannoch wrote:

Why is this a problem.  When working with a big project with many VI's and source control.  Developers end up checking in a lot of VI's that are not used.  These VI's lead to confusion when someone starts looking for something.  Maybe I just like to have things orderly on the hard drive as well.


I use Subversion with TortoiseSVN as source code control software. I installed TSVN Toolkit from Viewpoint System in LabVIEW, which gives you a 'Delete' option in a right click menu in the LabVIEW project explorer.

Using the 'Delete' option the VI is deleted from project explorer, deleted from hard disc and is marked for deleting from Subversion with your next commit.


You know, I use that toolkit, also, and I never thought of doing that!

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 5 of 6
(3,034 Views)

@Jacobson-ni wrote:

If you use auto-populating folders you just delete the file from disk and the project updates appropriately but I don't use them unless I'm working on a project where the original programmer used them.

 

I follow the same workflow as Bill. Every so often I will also drag the folder containing my project source from windows explorer into my LabVIEW project. You will get some warning/error dialog letting you know that most files are already in the project but if you press okay LabVIEW mimic the folder hierarchy on disk and bring in any files that were not already in the project. I find that this lets you locate any orphaned files without too much effort.


I look in the dependency folder to see if there's stuff in the project's physical folder, but that's tedious, and also inaccurate.  I like your way, better.  🙂

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 6 of 6
(3,033 Views)