03-05-2025 03:05 AM - edited 03-05-2025 03:06 AM
Hi,
we are having some troubles on factory pattern projects, I hope you had the same issue and you have already found a solution 😄
The application LV project uses several external PPLs, they all reside on the C:\ drive. These lvlibps remain always the same, we just build an application which invokes them.
Problem: if the application - which is also just a LabVIEW project - is opened and built on the D:\ drive, we launch the resulting exe, works everything fine. But if we build the application from the C:\ drive, launching the compiled application searches for the invoked lvlibps, and it can't find them. In this case, the path for the lvlibps look to be relative. Building it from D:\ uses absolute paths.
As I don't have a D:\ drive due to IT restrictions, I an not able to build a working application 😞
Does anyone know more about it? Can I command LabVIEW at build to use absolute paths for invoked lvlibp?
03-10-2025 07:00 AM
It's correct that LabVIEW will treat a path to a dependency on a different drive letter as absolute (see our wiki).
Sadly, I am not aware of any static (i.e. not programmatic) way of doing what you're asking for. Maybe others have more ideas?
DSH Pragmatic Software Development Workshops (Fab, Steve, Brian and me)
Release Automation Tools for LabVIEW (CI/CD integration with LabVIEW)
HSE Discord Server (Discuss our free and commercial tools and services)
DQMH® (Developer Experience that makes you smile )
03-11-2025 09:03 AM - edited 03-11-2025 09:38 AM
@Madottati wrote:
As I don't have a D:\ drive due to IT restrictions, I an not able to build a working application 😞
Since you don't write anything further about the restrictions: Have you tried subst? You can create a virtuell drive D:\ with the following command in Powershell:
> subst D_: c:\foo\baa
Maybe that's enough to make LabVIEW think it's opened from D. 😉
Edit: you have to remove the _ in the command, but without it the forum insert a smiley.
03-11-2025 09:33 AM
I haven't tried any virtual drive, because we have a network drive G:\ --> so I set the build target folder to G, the resulting lvlibp references now as absolute path to the resource libraries.
But it's just a workaround, I am curious what NI answers. We prepare a support ticket for it.
03-12-2025 02:39 AM
If your startup.vi has the same relative path to the .lvlibp as the built executable, you should be able to solve the problem by changing your folder structure:
You won't have a central place for all ppls with this approach, but you can use different versions of your ppls in different applications.