This is from the function panel help for GetProjectDir():
"Gets the name of the directory that contains the currently loaded project file.
You can use GetProjectDir when you distribute a project and its related files to multiple users who might place the files in a different directory on each computer. If your program needs to access a file that is in the same directory as the project, you can use GetProjectDir and MakePathname to construct the full pathname.
In a stand-alone executable, the function obtains the directory containing the executable file."
The last sentence there is key. Since all CVI programs run as stand-alone executables since about CVI 5.0 (IIRC), this function is always going to return the directory that the executable file lives in. Meaning that the only time it will return the actual project directory is if it is running from the project directory.
Martin Fredrickson
Test Engineer
Northrop Grumman
Advanced Systems and Products
San Diego, CA 92128