Hexagon Geospatial
MENU

GeoMedia

Search for an answer, post a question, or answer other users' questions in our GeoMedia support discussions. This discussion board is a great way to collaborate with industry peers around the world. It is intended for discussion and support of the GeoMedia Desktop and Add-on applications.
Showing results for 
Search instead for 
Do you mean 
Reply
Highlighted
Contributor
Posts: 79
Registered: ‎05-30-2016
Accepted Solution

Batch Plotter not exiting and silent mode from command line interface

[ Edited ]

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

Staff
Posts: 131
Registered: ‎05-26-2016

Re: Batch Plotter not exiting and silent mode from command line interface

[ Edited ]

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

 

Contributor
Posts: 79
Registered: ‎05-30-2016

Re: Batch Plotter not exiting and silent mode from command line interface

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.

Staff
Posts: 131
Registered: ‎05-26-2016

Re: Batch Plotter not exiting and silent mode from command line interface

[ Edited ]

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.

 

 

 

Contributor
Posts: 79
Registered: ‎05-30-2016

Re: Batch Plotter not exiting and silent mode from command line interface

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.

Staff
Posts: 131
Registered: ‎05-26-2016

Re: Batch Plotter not exiting and silent mode from command line interface

[ Edited ]

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.

Do you need immediate support?
If you encounter a critical issue and need immediate assistance please submit a Service Request through our Support Portal.