[GRASS-user] GRASS window timing question

Zoltan zoltan at sonic.net
Wed Aug 27 13:42:59 PDT 2014


Hi,

I'm new to GRASS and am running on a 64-bit Windows-7 OS. The app is 
working quite well for me overall but I'm having one issue with timing 
on the GRASS window. I kind of suspect there's no fix for this but I'll 
ask anyway.

I am launching GRASS from a batch file with the GRASS_BATCH_JOB variable 
set. The batch job just calls g.parser on a text file, like this:

     "C:\ProgramFiles\GRASS\bin\g.parser.exe" cmds.txt

The cmds.txt file looks roughly like this:

     g.region ... parms ...
     d.mon start=wx0 width=1700 height=1000
     ...some v.proj commands...
     d.vect map=...one of the maps...
     d.vect ...a few more d.vect commands...

The problem I'm having is this: If the actual display window is not 
visible when the d.vect commands run, the graphics fail to draw properly 
and I also get errors in some cases.

If I wait for the display window to appear on the monitor before running 
the d.vect commands, all is well. This seems logical...something about 
the display object is not fully initialized when the d.vect commands run 
so things don't work.

I do have a workaround, which is just to insert a sleep statement to 
give the window time to initialize but it needs to be rather long and it 
would be nice if there were some other way to wait for window 
initialization.

Is there already a way to do this, or would that be an enhancement request?

Again, thanks for the great app, and thanks in advance if you can help 
on this question!

     Zoltan


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20140827/aa50f95e/attachment.html>


More information about the grass-user mailing list