LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Global replace library path in call library function in multiple project VI files

Solved!
Go to solution

I am working on a project with many VI files, a large number using a call library function node.  The call library function node makes a specific function call to a C-callable API (DLL).   The single library path has changed and we need to update the path in each node in every VI using the API (DLL).   Is there a tool or a good way to globally search and replace the path string across VI files spread across multiple project subdirectories?

0 Kudos
Message 1 of 3
(4,006 Views)

Yes!

 

You can change the library path using scripting with the VI Snippet below. You just need to pass the new path (as a constant) and a VI Reference (you could make this a control in a subVI).

 

changePath.png

 

Then, you can acquire a list of all the VI references in your project, and pass them to this VI - it will change the path of the library in the CLFN node (here, it will change the first CLFN node found in testCLFN.vi to C:\new.dll). You should add a For Loop autoindexing rather than using the Index Array node, and then you should be good to go.


GCentral
Message 2 of 3
(3,974 Views)
Solution
Accepted by topic author big.tuna

Attached is a VI that might do exactly what you want, with some minor path constant modifications and the deletion of a diagram disable structure.

Your mileage may vary, and I don't promise it won't destroy your project/computer/world.

 

Good luck 🙂


GCentral
Message 3 of 3
(3,971 Views)