Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

Possible to allow user to select XNET DB?

I'm writing an application to create a test sequence incorporating user-selected CAN commands. I want to allow the user to select the XNET DB file while the application is running, but this doesn't seem to be possible, at least not as far as I can tell. I have already successfully written all the parsing code I need, now I just have to figure out how to let the user choose the DB file.

 

Any ideas? I'm looking into the Generic 'Create Session' approach right now, but I don't know if that's going to work.

 

Thanks in advance!

0 Kudos
Message 1 of 5
(6,300 Views)

Under the XNet palette there is a palette for database control.  Generally what I do is delete the existing database on startup, clear the error (incase no database with that name exists) then add that database back with the path to the file that the user provides.  This way the user just replaces the DBC file (or whatever) and the application uses the new one.  There are all kinds of other things you can do with the database editing palette too.

0 Kudos
Message 2 of 5
(6,262 Views)

@Hooovahh wrote:

Under the XNet palette there is a palette for database control.  Generally what I do is delete the existing database on startup, clear the error (incase no database with that name exists) then add that database back with the path to the file that the user provides.  This way the user just replaces the DBC file (or whatever) and the application uses the new one.  There are all kinds of other things you can do with the database editing palette too.


That's it. There's still a major condition with that operation, you have to stop the session using the previous database (that makes sense because the database is invoked upon the creation of the session for memory allocation reasons). 

 

Rgds,

--Eric

Eric M. - Senior Software Engineer
Certified LabVIEW Architect - Certified LabVIEW Embedded Systems Developer - Certified LabWindows™/CVI Developer
Neosoft Technologies inc.

0 Kudos
Message 3 of 5
(6,189 Views)

Thanks guys. I could have sworn I posted a reply earlier stating that I'd fixed the problem, but apparently I didn't. The main problem I had was not being able to create a control for the XNET database name as I wasn't aware of the location of the XNET controls palette. Once I found that all was good.

0 Kudos
Message 4 of 5
(6,179 Views)

It also looks like I forgot I have two accounts and posted with my old one. Whoops.

0 Kudos
Message 5 of 5
(6,175 Views)