08-08-2014 10:24 AM
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!
08-11-2014 09:14 AM
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.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
08-21-2014 01:22 AM
@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.
08-21-2014 08:47 AM
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.
08-21-2014 09:36 AM
It also looks like I forgot I have two accounts and posted with my old one. Whoops.