Jump to content
TUFLOW Forum
Guest ianmm

Time variable in Tuflow to GIS

Recommended Posts

Guest ianmm

Hi,

Does anyone have any experience of using TUFLOW_to_GIS.exe from a bath file?

I have a large number of file conversions to do and am trying to find a way to make things move a bit faster. So, I'm setting up a batch file with a standard format, where the time, grid size etc are passed to the convertor. However, running the convertor from a batch file is proving problematic!

If I open up TUFLOW_to_GIS.exe in the folder in which I am working, and input the following line directly into the command line, the convertor works with no problems.

TUFLOW_to_GIS.exe -asc –grid10 –t122 2006_200_E08_d.dat

However, if I put exactly the same line into a batch file and run the batch file it gets part way through, and asks for me to input the required time step. At which point I can put in 122, and it runs fine. Why is it able to read the grid size and file name, but not the time from the batch file?

Ultimately I am hoping to get the line below to work, where the various variables are set at the top of the batch file, and various forms of the convertor are run using the set variables.

start "TUFLOW_to_GIS" /wait /low TUFLOW_to_GIS.exe -asc –t%t2% –grid%grid% %string%_d.dat

Many thanks-any advice appreciated!

ianmm

Share this post


Link to post
Share on other sites

Hi,

I've got a batch file that I copy to the results folder for each project, for processing single or multiple outputs for Mapinfo. You can copy and paste the line below within your batch file and it will process as many files as you need. I use the -b switch for batch mode, which may fix your problem. Also I run the .exe from my Tuflow directory, you don't need it to be in the results folder. I think the batch file does though.

"C:\Program Files\Tuflow\utilities\TUFLOW_to_GIS.exe" -b -asc -t99999 ltc_008_d.dat

Cheers

Richard

Share this post


Link to post
Share on other sites

The problem with the batch file line is the presence of long dashes rather than short dashes (minus sign). The long dashes come from Word which loves replacing "-" with "–".

The line that doesn't work is:

start "TUFLOW_to_GIS" /wait /low TUFLOW_to_GIS.exe -asc –t%t2% –grid%grid% %string%_d.dat

whilst the below should work:

start "TUFLOW_to_GIS" /wait /low TUFLOW_to_GIS.exe -asc -t%t2% -grid%grid% %string%_d.dat

As mentioned in other posts we plan to modify the utility programs so that they treat long dashes the same as short dashes.

Cheers

Bill

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...