Subscribe to this thread
Home - Cutting Edge / All posts - Manifold 9 startup command line options
jsperr60 post(s)
#03-May-19 14:10

Are there command line options available when I start Manifold Viewer 9?

I would like my users to be able to click on a shortcut and open a certain map zoomed to a certain view.

Is the autexec: option available as in Manifold 8?

I have searched the documentation and not found an answer -- if it is there, please point me in the right direction.

Thank you.

jsperr60 post(s)
#05-May-19 15:04

After a bit of experimentation, I learned the following which upon reflection should have been obvious to me:

What does NOT work -- results in "Cannot load data."

E:\Downloads\manifold-9.0.169-x64\bin64\manifold.exe /autoexec: Dutchess Water

What does work -- enclose the filename in quotes if it has spaces in it:

E:\Downloads\manifold-9.0.169-x64\bin64\manifold.exe /autoexec: "Dutchess Water"

On to scripting opening a specific view.


8,479 post(s)
#06-May-19 10:36

There is currently no autoexec option in 9 / Viewer and no easy way to access windows from a script - we are planning to add both these things in the future, we wanted to adjust the design a bit.

jsperr60 post(s)
#06-May-19 18:47

There is currently no autoexec option in 9 / Viewer...

Really? I have it working to open a map file in both 9.0.169 and Viewer.

At work, where I have Viewer, the following line in a shortcut works to bring up viewer with the open to the project pane where I can direct users to double click the map icon and right click a location to view in the active window. Not exactly what I want but close enough for now as I develop it further.

"F:\Software\Manifold 9 GIS Viewer\bin64\manifold.exe" -autoexec:

298 post(s)
#06-May-19 20:06

Yes, really!


notepad.exe readme.txt

opens the textfile

manifold.exe "File" 

opens mapfile

autoexec: is ignored

jsperr60 post(s)
#07-May-19 01:50

Got it!

Thank you -- I did not find that searching the documentation.


8,479 post(s)
#07-May-19 07:30

Everything that starts with - or / is considered to be a command-line option. Unsupported command-line options are silently ignored (because MANIFOLD.EXE is a Windows application, if it was a command-line application, it would have complained about each unsupported option). If someone wants to open a file with the name that starts with -, the name has to be quoted: MANIFOLD.EXE ""


5,383 post(s)
#07-May-19 08:01

I did not find that searching the documentation.

Manifold documentation doesn't cover Windows features. This is one of those, but I agree a short note could be added for that. Most Windows programs will take a command line argument of a file to open.

For example,

notepad.exe myfile.txt

Will open the file myfile.txt in notepad. Unlike Manifold, notepad does not silently ignore unsupported command line options that begin with -, and instead treats them as if they were intended as a file name to open. So if you try

cnotepad.exe -autoexec: myfile.txt

that doesn't work.


manifold.exe just Manifold being a regular Windows program. Doing

manifold.exe -autoexec: an example of Manifold ignoring invalid command line options and proceeding to open in the usual Windows way.

Manifold User Community Use Agreement Copyright (C) 2007-2017 Manifold Software Limited. All rights reserved.