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
Hi Bryan,
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?
Best Regards,
07-25-2012 12:09 PM
Hey Allison,
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
Hi Bryan,
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.
Best Regards,
07-27-2012 09:43 AM
I did go from XP to 7. But the dbc files had the same path on both machines.
07-30-2012 04:40 PM
Hi Bryan,
I would recommend looking through this KnowledgeBase article which describes the best way to handle filepaths for distributing applications.
Best Regards,
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
Hi Bryan,
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,
11-20-2017 09:33 AM
There is an even more radical solution to your problem, as I understood it.
XNET has a list of database aliases, stored under C:\Users\All Users\National Instruments\NI-XNET\nixnetAlias.xml. If you copy the nixnetAlias.xml file from machine A to machine B, you'll have the same alias associations that you had on the original project.
You can also change the paths by editing the xml file, should you want to relocate the databases.
09-11-2024 07:38 AM
Just in case anyone using a newer OS wants to use the approach shown by cbacchiani, the location of the nixnetAlias.xml file for Windows 10/11 is now at C:\ProgramData\National Instruments\NI-XNET instead of under C:\Users\All Users.