Configuration Tips - Using Command Line Arguments

For administrators or others working with multiple configurations, or perhaps needed to launch MicroStation from another application, Command Line Arguments can be used to specify a number of starting criteria.

These arguments, often referred to as switches may be appended to a command line. There is a list of them in the help topic: Home > Programmed Customizations > Command Line Arguments and Exception Logs > Command Line Arguments. Some are used for troubleshooting and other purposes, the most relevant arguments for these cases are listed below in their recommended order of use:

- for example, -wrC:\Bentley\Configuration\
-WK<WorkSpace> Specifies initial WorkSpace
- If WorkSpace is specified, a child WorkSet must also be specified using -WW
-WW<WorkSet> Specifies initial WorkSet
- If WorkSet is specified, its parent WorkSpace must also be specified using -WK
-WS<configuration_variable> Specifies a configuration variable to be defined at startup
- for example, -ws_USTN_USER_CONFIGURATION_LABEL=MyConfiguration

Known issue:
MicroStation Update 17 contains a defect that results in these switches being ignored on the desktop, i.e. when used in shortcuts or batch files. This will be fixed by Update 17.1, due for release in September 2022. This does not affect the use of command line switches in ProjectWise.

Some Examples:

"C:\Program Files\Bentley\MicroStation CONNECT Edition\MicroStation\microstation.exe" "-wrC:\ProgramData\Bentley\MicroStation CONNECT Edition\Configuration\" -wkExample -wwGS_VBA -ws_USTN_USER_CONFIGURATION_LABEL=FromShortcut

starts MicroStaion with the following WorkSpace and WorkSet.

Note that the WorkSpace is labelled FromShortcut by the -ws switch


"C:\Program Files\Bentley\MicroStation CONNECT Edition\MicroStation\microstation.exe" -wrG:\BentleyConnect\ -wkMyCompany -wwDiscipline

will start MicroStation using a Custom Configuration located on a mapped G:\ drive with the WorkSpace "MyCompany" and WorkSet "Discipline".

This could be enhanced by adding the -ws switch:

"C:\Program Files\Bentley\MicroStation CONNECT Edition\MicroStation\microstation.exe" -wrG:\BentleyConnect\ -wkMyCompany -wwDiscipline "-ws_USTN_USER_CONFIGURATION_LABEL=My Company Configuration"

Note the quotation marks around any argument statements that include spaces.

While the arguments are listed in upper case in our documentation, they are not case sensitive. Writing then in lower case is often clearer when compiling or reviewing lengthy command lines.