Release current directory

This is not mine, it's a tip I found years ago in a LabVIEW forum and still works like a charm (thanks to the genious that got it!).

When the user selects a file to work with (signal data you want to analyze, for example) your LabVIEW application "grabs" its path, so you can't delete it or its directory, or unmount the unit if you're using an external drive, even if you are not reading that file anymore and you clear any path controls. But we can use Kernel32.dll method SetCurrentDirectoryA to release it (obviously, this only works in Windows systems).

No downloadable code today, it's better if you link the call library function node by yourself, so you're sure it finds the dll. You can find more info about this method here: SetCurrentDirectory function at MSDN.


Entradas populares de este blog

SNMP library for LabVIEW

Required Outputs Wizard

Antenna pointer