07-23-2012 03:37 PM
I have a project on one machine and need to move it to another machine. The problem is that the XNET sessions in the project are no longer linked to an alias that links to the original DBC file. How can I move a project and keep all the XNET sessions link to their alias files?
Solved! Go to Solution.
07-24-2012 01:47 PM
Are you using absolute paths in your program? If so, this could be the reason that the links are broken. You can fix this by using relative paths. If this is not the issue, are you seeing any specific errors?
07-25-2012 12:09 PM
The links that are broken are the session paths in the project. When I would click on the session in the project manager it would pop up a message saying it could not find the alias to the dbc file. So I had to go through each session and point it to the correct dbc file. I just figured that since I moved the directories and the project to a new machine with the same path that the sessions would still be linked to the dbc files.
I have already fixed the problem this time. I am just wondering how to do it next time without having to go through each session and pointing them to the dbc files.
07-26-2012 03:18 PM
I'm glad to hear that you were able to resolve the issue. Do the two development computers have the same operating system? Windows XP and Windows 7 tend to have different path structures.
07-30-2012 04:40 PM
I would recommend looking through this KnowledgeBase article which describes the best way to handle filepaths for distributing applications.
07-30-2012 05:13 PM
We are talking about two different problems at this point. I am not trying to build an executable or using the current vi's path constant.
I have a project on machine A that works fine. I want to move the project from machine A to machine B.
When I move the project to machine B and open the project there is a list of XNET Sessions that are used in the project. When I click on an existing XNET Session I get a message:
Session database not found.
Alias "CAN Channels" saved for this session at last edit cannot be found in the alias list. Select an alias from existing aliases or browse to add a new alias.
Select folder icon to browse to a data base file and create an alias name.
So then I have to go through every session and point it to a database. So I guess I should have asked how do I move the alias list from machine A to machine B so I do not have to go through all the sessions and pick a database file and create the alias again?
Sorry if I did not explain enough in the 1st post, I am just starting to use XNET.
07-31-2012 09:39 PM
I appreciate the clarification. You are correct in that I was referring to file paths rather than device inputs. I have a couple of ideas that might work for you. First, I encourage you to look in the example finder in LabVIEW and navigate to the Hardware Input and Output >> System Configuration folder. In this folder you will find an example, Rename Aliases.vi. This example shows you how to programmatically rename the aliases of hardware connected to your computer. If you were to do this first before running your other program, it might help to standardize the aliases across the two computers.
Another option would be to export your NI Measurement & Automation Explorer Configuration from the development computer and then import it before running your code on the second computer. The folder I referenced in the example finder above has two examples on how to do this programmatically.
Hope this helps,