Passing arguments to the Charting Logger

This is where you talk about the NXJ software itself, installation issues, and programming talk.

Moderators: roger, 99jonathan, imaqine

Passing arguments to the Charting Logger

Postby CoolHube » Mon Sep 03, 2012 4:01 pm

Is it possible to pass arguments to the nxjchartinglogger (included in the 0.9.1 package)?

I am specifically trying to set a default path for the folder where the log files are saved.

The permissions on \bin folder on my Windows Vista machine (actually, in the \Program Files (86) folder) doesn't allow a file to be written there without jumping through hoops.
Thanks,
CH
CoolHube
New User
 
Posts: 5
Joined: Mon Sep 03, 2012 12:27 am

Re: Passing arguments to the Charting Logger

Postby kirkpthompson » Mon Sep 03, 2012 6:03 pm

Hi.

The NXJ Charting Logger will use the current directory when it was launched. There is no way to specify [via parameters] a different working directory. A possible workaround is to create a shortcut for <lejos_home>\bin\nxjchartinglogger.bat (in WInXP, one is created for you in C:\Documents and Settings\All Users\Start Menu\Programs\leJOS NXJ if you used the Windows installer), modify it's "Start in" attribute to the path you want it to be.

A command line argument for setting the working path may be a good future enhancement candidate.

Best,
-K
Leg Godt!
User avatar
kirkpthompson
leJOS Team Member
 
Posts: 282
Joined: Wed Dec 05, 2007 1:27 am
Location: New Mexico, USA

Re: Passing arguments to the Charting Logger

Postby CoolHube » Mon Sep 03, 2012 6:24 pm

Thanks Kirk. I might try to play around with the .bat file.

If you get around to enhancing the Charting Logger, a 'preferences' menu would work well for those of us who can't remember where to find the command line prompt. :)
CH
CoolHube
New User
 
Posts: 5
Joined: Mon Sep 03, 2012 12:27 am

Re: Passing arguments to the Charting Logger

Postby kirkpthompson » Mon Sep 03, 2012 6:35 pm

I would recommend you don't mess with the .BAT file. Just create a shortcut to it, bring up it's properties, and modify the "Start in" field to where you want your default directory to be. Use the new shortcut to launch the tool.

Your "Preferences" suggestion has been noted and Thanks. Can you describe which/what "preferences" should be included?

Best,
-K
Leg Godt!
User avatar
kirkpthompson
leJOS Team Member
 
Posts: 282
Joined: Wed Dec 05, 2007 1:27 am
Location: New Mexico, USA

Re: Passing arguments to the Charting Logger

Postby CoolHube » Mon Sep 03, 2012 6:45 pm

NOTE: I changed the starting location as suggested. Works like a charm. Also clicked on the Start Normal and that took care of the start minimized issue.
**********************************************************

I can think of a couple, but am positive that there are more.

- Default name/address for NXT to be connected to
- Default directory for storing log files
- Default file extension for log files (*.txt, *.csv)
- Default naming convention for log files (like a camera - if nxtlog1.txt is already in the folder, then create nxtlog2.txt, etc.)
- 'Start with focus Maximized', 'Start Minimized' or 'Start in Background'. (right now, the program starts in the background on my computer - okay for the command line session that is running, but for the GUI it would be better to start maximized or normal)

CH
CoolHube
New User
 
Posts: 5
Joined: Mon Sep 03, 2012 12:27 am


Return to NXJ Software

Who is online

Users browsing this forum: No registered users and 3 guests

more stuff