11-30-2023 02:20 PM
I am getting error while using relative path: custom report template could not be found.
I have 2 folders Executable and Source inside testing folder. VI and project is saved in Source folder(C:\testing\Source). Report template is in executable(C:\testing\Executable).
Tried relative paths: ..\Executable\ATP4100171 Test Report.dot and ..\..\Executable\ATP4100171 Test Report.dot
I am able to generate report when I give absolute path. C:\testing\Executable\ATP4100171 Test Report.dot
Does MS office report allow relative path. Please help!
12-01-2023 02:25 AM
12-01-2023 11:25 AM
This test software will be used by multiple people. They will use .exe. They might have different folder structure
It would be better to give relative path
I tried path which is relative to my VI. It dint work
03-13-2024 10:26 PM
i have same problem, have u resolve it?
03-14-2024 02:47 AM - edited 03-14-2024 02:50 AM
Relative paths to what? Most LabVIEW file functions that operate on actual files on disk do not support relative paths because it is usually unclear to what location they should be relative.
But, but there is a Current Directory which points to the directory the current executable is running from.
Yes and the concept of a current directory in a multithreading environment is totally flawed. It can and will change frequently. There are APIs to change it at will, the common file dialogs will change it to whatever directory you were in whenever you select a file and the start location when running in the IDE is the LabVIEW installation directory or whatever directory the program shortcut defined.
You as the programmer know best to what location you want it relative, LabVIEW can’t read your mind nor the mind of your software users. Since you know what location you want to reference with your relative path you can always build an absolute path by combining that reference location and your relative path. That way there is no ambiguity. Well you will soon find out there still can be as your users complain it does not use the file they want but if you as creator of your app get problems to determine the correct path, LabVIEW can’t even start to guess the right one.