04-22-2010 02:39 PM
I am building up a second PC that will contain a duplicate copy of my LabWindows/CVI 7.0 workspace. However, on the 2nd PC the VXIPNP drivers install into the folder C:\Program Files\IVI Foundation\VISA instead of the C:\VXIPNP folder on the 1st PC. I need to be able to port my workspace between the 2 PC's (the 2nd PC is used for offline editing and debug). The workspace consists of 85 projects each with the same 6 *.fp files that point to the C:\VXIPNP folder. Changing the path to each of the 500 *.fp reference one at a time is too time consuming.
Is there way to quickly change the path to all the *.fp files in the work space?
I tried editing the .CWS file in Wordpad and globally replacing the path strings, but that did not work. I tried creating C:\VXIPNP folder and sub-folders and placing shortcuts in them to the C:\Program Files\IVI Foundation\VISA folder, but this did not work.
[Note: I cannot upgrade to a higher LabWindows/CVI due to the large expense of rewriting the code since NI removed the Windows SDK feature starting LabWindows 8.5(?)]
Thanks for any thoughts.
04-23-2010 10:09 AM
Have you tried reinstalling the drivers on the second computer and setting the directory in the installer to the same place as they are on your other machine? It seems like it would be the easiest solution.
-Christina
04-23-2010 11:27 AM
04-24-2010 09:10 AM
My guess is that the drivers are using the registry key that the IVI shared components created to use as their install location.
If you uninstall the IVI shared components, make sure you select the option to remove everything, and then reinstall them you will be prompted where you want them installed. Select c:\VXIPnP.
BUT and this is a big but it could break other software components already installed - you might have to reinstall them also.
04-27-2010 03:06 PM
The scenario that you are describing should work without you having to fix up the paths. Something must have gone wrong when the projects were saved in your first computer.
To verify this, you can open one of your .prj files from your first computer in a text editor. The .prj file includes several blocks of values, one for each file in the project ([File 0001], [File 0002], etc...). Find the block that corresponds to one of the .fp files that is supposed to be in c:\vxipnp folder. It should contain the following two values:
Path Is Rel = True
Path Rel To = "VXIPlug&Play"
What is it that you see in yours?
Luis
04-28-2010 04:58 AM
They all have the following settings:
Path is Rel = False
Path = "/c/VXIPNP/WinNT/..."
Note that all the .LIB files have the setting to TRUE and VXIPlug&Play.
Is there a way to change this for the .FP files so that my workspace and projects will work in both environments?
I also have the same problem with several hundred .FP files with non-relative paths to the CVI folder "/c/Program Files/National Instruments/Cvi70/...". This makes upgrading to a newer LabWindows/CVI version very difficult too. Maybe there is a fix here too.
04-28-2010 12:34 PM
Ah, yes, that definitely explains why you're having problems when you take your projects to the other PC.
I'm not entirely sure why those projects were created without the relative paths, but I can think of one possibility. Do you remember if you created these projects by using the Options>>Create DLL Project command from the function tree window? If so, then you might have run into a bug that existed in CVI, prior to version 8.0, which resulted in those projects not automatically being marked to be saved. Therefore, if you never made any additional changes to these projects, it's possible that they were never saved with the correct path data.
Going forward, you do have some options. The first thing I'd do is to ensure that CVI 7.0 will save the path data correctly whenever you do save one of those projects. To try this out, simply make some change in CVI that will force the project to be saved. For example, add a file to the project and then remove it. Then remember to save the project (if you don't have "Auto Save Workspace" enabled). Then look inside the .prj file to see if those paths are now correctly marked as relative.
If this test works, that's good news. We now just need to find the best way to force CVI to save all 80+ of your projects. In 7.0 there was no good way of doing this, but there is a hack you could do that will cause it to happen. You do have to edit each .prj by hand (therefore, make sure you don't have the project loaded in CVI at the time). But it's a fairly simple edit, which hopefully you can copy/paste pretty quickly. The idea is to force CVI to complain about an invalid path when it loads the project (but not so invalid as to refuse to load the project altogether).
The change you need to make is to replace one of these lines:
Path Is Rel = True
with:
Path Is Rel = True
Path Rel To = "CVI"
Path Rel Path = "foo.fp"
You only need to change it for one of the files in the project.
After you change your projects, when you load the workspace CVI will complain about how it can't find foo.fp. That's okay. Just dismiss this popup (which you'll probably have to do 80+ times...). But the nice thing is that this will trigger a resave requirement for each project. So all you have to do then is select File>>Save All.
Assuming my asumptions are correct and all this works, we'll still have to address the other hundreds of .fp files that are relative to CVI. Can you give me an example of what one of those .fp files is, so that I can see if I have any ideas? Also, are these in the same projects that have the VXIpnp drivers, or are they in different projects?
Luis