Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

Move XNET dtabase

Solved!
Go to solution

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? 

0 Kudos
Message 1 of 9
(8,712 Views)

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,

Allison M.
Applications Engineer
National Instruments
ni.com/support
0 Kudos
Message 2 of 9
(8,705 Views)

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.

0 Kudos
Message 3 of 9
(8,696 Views)

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,

Allison M.
Applications Engineer
National Instruments
ni.com/support
0 Kudos
Message 4 of 9
(8,687 Views)

I did go from XP to 7.  But the dbc files had the same path on both machines.

0 Kudos
Message 5 of 9
(8,682 Views)

Hi Bryan,

 

I would recommend looking through this KnowledgeBase article which describes the best way to handle filepaths for distributing applications.

 

Best Regards,

Allison M.
Applications Engineer
National Instruments
ni.com/support
0 Kudos
Message 6 of 9
(8,673 Views)

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.

 

0 Kudos
Message 7 of 9
(8,670 Views)
Solution
Accepted by topic author _Bryan

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,

Allison M.
Applications Engineer
National Instruments
ni.com/support
0 Kudos
Message 8 of 9
(8,658 Views)

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.

 

0 Kudos
Message 9 of 9
(4,531 Views)