06-18-2018 04:18 PM - edited 06-20-2018 01:59 PM
Running a Batch Plotter gbp file from the command line. The script starts with "start BatchPlot.exe export -file, etc". It runs fine but there are two issues.
When it's done it does not close BatchPlot.exe or the geomedia instances it started. How do I close it when done?
Actually, I think it's not closing due to an error message popping up. I can see the dialog instance in task manager, but cannot switch to view it. I noticed that in GeoMedia 2014 it does exit ok. I'm having the issue in 2018. I was expecting error messages to get written to the command window, not a dialog. Can't tell what the error is though, as there is no error when running the same export manually (ie. not as a bat file) from the Batch Plotter.
And, secondly if there are images already existing it pops up a dialog and waits for a response. Is there a switch to specifiy overwrite?
Thanks
Solved! Go to Solution.
06-20-2018 08:55 PM - edited 06-20-2018 10:05 PM
First, if there are images already and itpops up a dialog and waits for a response. There are no switches to I know of to continue.
I would in a batch script change directory to the output folder ie cd /d <outputfolder> the del *.<ext> from that folder.
If you use the START in dos command line it runs in a seperate window , maybe look at /B, wait and exit to resolve your not closing problem.
I don't have this problem, I usually just have a batch script i run. (ie run.bat) Here's and example that runs a print and an export and closes ok.
@echo off
cd /d "C:\Program Files (x86)\Common Files\Intergraph\GeoMedia\Program"
"C:\Program Files (x86)\Hexagon\GeoMedia Professional\Program\BatchPlot.exe" export -file "C:\temp\" -type jpg -resolution 600 -qfactor 15 "C:\temp\google.gbp"
"C:\Program Files (x86)\Hexagon\GeoMedia Professional\Program\BatchPlot.exe" print -printer "\\au-mel\FX DocuCentre-V C3376 (P2)" C:\temp\google.gbp
exit
also
@echo off
cd /d "C:\Program Files (x86)\Common Files\Intergraph\GeoMedia\Program"
START /wait BatchPlot export -file "C:\temp\" -type jpg -resolution 600 -qfactor 15 "C:\temp\google.gbp"
exit
06-21-2018 02:57 PM
Thanks RolandK for your suggestions.
As you say, I could delete pre-existing files using a dos command.
As for exiting, the command window exits ok. It's the batch plotter executable that does not exit when done. I suspect a dialog box gets launched, and then sits waiting for user input, but can't see it, except for in Task Manager. Cannot 'switch' to it. However, when running the gbp from the Batch Plotter manually, no dialogs. Go figure.
06-21-2018 03:09 PM - edited 06-21-2018 03:13 PM
Just ran both my scripts on v16.5, All is cleared ok, Nothing left in Task Manager, i see all being removed.
What is you script?
If same data and script run on 2014 and causes error on 2018 you should probably log a support ticket.
06-21-2018 03:30 PM
hmm. I re-installed GeoMedia as a hail mary to fix something else, and now the batch plotter exits properly when running my script.
Here's the script anyways.
DEL "C:\Users\perric\Documents\Exports\BatchPlotter\output" /s /q
start /wait BatchPlot.exe export -file "C:\Users\xxxxxx\Documents\Exports\BatchPlotter\output" -type jpg -resolution 300 -qfactor 15 "C:\GeoWorkspaces\PlottingFiles\test.gbp"
sigh.
06-21-2018 03:36 PM - edited 06-21-2018 03:50 PM
As your spawning a task by using the START , ensure you use EXIT at end of your script, just like mine, too ensure it quits that script.
You may have had an old gm task active which was causing your problem.