Command Line Modelio

To run Modelio in command line, you must execute:

  • In Windows:
    The executable file modelio.exe located in Modelio’s installation folder.

  • In Linux:
    The executable file modelio.sh located in Modelio’s installation folder.

  • In MacOSX:
    The executable file modelio.sh located in the Contents/MacOS subdirectory of Modelio’s installation folder.

In this page, we will refer to Modelio’s executable full path (for example: C:\Program Files\Modelio\modelio.exe), as ${MODELIO_EXE}.

Options list

Modelio comes with several command line options:

-workspace workspacePath
Indicates the workspace to use.

For example:

  • Open Modelio in using C:\Users\user\myWorkspace directory as workspace .
    ${MODELIO_EXE} -workspace C:\Users\user\myWorkspace

-mserver saasServerUrl
Sets a default server value for the login window.

For example:

  • Open Modelio using https://modelioserver.mycompany.com/ address as saasServer .
    ${MODELIO_EXE} -mserver https://modelioserver.mycompany.com/

-muser login
Sets a default login value for the login window.

For example:

  • Open Modelio SaaS using User1 as login .
    ${MODELIO_EXE} -muser User1

-project projectName or -open projectName
Indicates which project to open.
Needs to specify a login and token to access a server project, see example below.

For example:

  • Open a Modelio local project named "MyProject":
    ${MODELIO_EXE} -project MyProject

  • Open a Modelio local project named "AnotherProject" in the C:\Users\user\myWorkspace workspace :
    ${MODELIO_EXE} -workspace C:\Users\user\myWorkspace -project AnotherProject

-join projectID
Join the project which ID is projectID.
Needs to specify a server, user and token, see example below.

To get this identifier:

  1. log into your server with Modelio

  2. click on the project for details

  3. look for the 'Project identifier' property

-musertoken token
Use this credentials combined with the -muser option when opening or joining a Modelio Server project.

To get the user token:

  1. log into Modelio Server with a web browser

  2. on the top right, edit your user information

  3. generate a token if necessary

  4. use the 'save token' button to download the token value

Examples:

  • Join a Modelio Server project as "user1".
    ${MODELIO_EXE} -join 12 -mserver https://modelioserver.mycompany.com/ -muser user1 -mtoken user1_token

  • Open a Modelio Server project named "MyProject" as "user1".
    ${MODELIO_EXE} -project MyProject -muser user1 -mtoken user1_token

-batch scriptFile
Indicates a Jython script to launch automatically after opening a project. Modelio will close automatically after script execution. Must be used with "-project" or "-join".

For example:

  • Open the "MyProject" project and run the "C:\Users\user\myscript.py" Jython script on it.
    ${MODELIO_EXE} -project MyProject -batch C:\Users\user\myscript.py

-param key val
Set the key variable with the val value. This variable is available in the jython script.

For example:

  • Run the " C:\Users\user\myscript.py " Jython script on the "MyProject" project and set two variables "myVar1" and "myVar2" and having respectively the values "the value1" and "the value2":
    ${MODELIO_EXE} -project MyProject -batch C:\Users\user\myscript.py -param myVar1 " the value1 " -param myVar2 " the value2 "