Silent Mode Configuration

The configuration files are located in the publisher install path, under the folder "launch".
Note: If the installer (.exe) is used to install Publisher for Rhapsody, the folder "launch" is located in C:\ProgramData\Publisher4Rhapsody\%PUB_VERSION%\launch,
otherwise, the folder "launch" is located in the same folder than the "publisher.exe" file.
Note: %PUB_VERSION% corresponds to the Publisher Version, for example, 3.3.0.

Configuration of MD2RhpSilent.bat

The provided MD2RhpSilent.bat file do the following actions:

To configure the MD2RhpSilent batch file - when installer has been used to install Publisher for Rhapsody :

  1. Open the file MD2RhpSilent.bat (in the launch folder) with a text editor. This is what you should see:
    REM The path to the folder level that contains the publisher.exe file
    SET PUBLISHER_INSTALL_PATH=C:\Program Files\Publisher4Rhapsody\%PUB_VERSION%
    REM The path to the Publisher properties
    SET PUBLISHER_DATA_PATH=C:\ProgramData\Publisher4Rhapsody\%PUB_VERSION%\
    REM The path to the folder level that contains the rhapsody.exe file
    SET RHP_PATH=C:\Program Files\IBM\Rhapsody\10.0.1\
    REM Define whether Rhapsody interface (UI) must be displayed or not.
    SET HIDE_RHAPSODY_UI=false
    REM Define the maximum amout of time to wait when starting Rhapsody.
    SET START_RHAPSODY_TIMEOUT=120

    REM The absolute path of the MagicDraw file that will be published.
    SET MDZIP_PATH=%~1
    REM The path of the new Rhapsody project folder. Note: If the folder already exists, the publication will not be completed to avoid the loss of data.
    SET RHP_PROJECT_PATH=%~2
    REM The name of the new Rhapsody project.
    SET RHP_PROJECT_NAME=%~3

    cd /d %PUBLISHER_INSTALL_PATH%
    publisher.exe -headless -nosplash -launch "%PUBLISHER_DATA_PATH%\launch\MD2RhpSilent.main.launch" -args[0] "%RHP_PATH%" -args[1] "%HIDE_RHAPSODY_UI%" -args[2] "%START_RHAPSODY_TIMEOUT%" -args[3] "%RHP_PROJECT_PATH%" -args[4] "%RHP_PROJECT_NAME%" -args[5] "%MDZIP_PATH%" -silent
    cd /d %PUBLISHER_DATA_PATH%\launch
  2. Check that predefined variables such as PUBLISHER_INSTALL_PATH, PUBLISHER_DATA_PATH or RHP_PATH are set as expected and update values as needed.
  3. By default, the next three variables MDZIP_PATH, RHP_PROJECT_PATH and RHP_PROJECT_NAME are declared as parameters of this script. If needed, they can be hard coded following the comment just above.

To configure the MD2RhpSilent batch file - when installer has not been used to install Publisher for Rhapsody :

  1. Open the file MD2RhpSilent.bat (in the launch folder) with a text editor. This is what you should see:
    REM The path to the folder level that contains the publisher.exe file
    SET PUBLISHER_INSTALL_PATH=<current_publisher_path>
    REM The path to the Publisher properties
    SET PUBLISHER_DATA_PATH=<current_publisher_data_path>
    REM The path to the folder level that contains the rhapsody.exe file
    SET RHP_PATH=<rhapsody_path>
    REM Define whether Rhapsody interface (UI) must be displayed or not.
    SET HIDE_RHAPSODY_UI=false
    REM Define the maximum amout of time (in second) to wait when starting Rhapsody.
    SET START_RHAPSODY_TIMEOUT=120

    REM The absolute path of the MagicDraw file that will be published.
    SET MDZIP_PATH=%~1
    REM The path of the new Rhapsody project folder. Note: If the folder already exists, the publication will not be completed to avoid the loss of data.
    SET RHP_PROJECT_PATH=%~2
    REM The name of the new Rhapsody project.
    SET RHP_PROJECT_NAME=%~3

    cd %PUBLISHER_INSTALL_PATH%
    publisher.exe -headless -nosplash -launch "%PUBLISHER_DATA_PATH%\launch\MD2RhpSilent.main.launch" -args[0] "%RHP_PATH%" -args[1] "%HIDE_RHAPSODY_UI%" -args[2] "%START_RHAPSODY_TIMEOUT%" -args[3] "%RHP_PROJECT_PATH%" -args[4] "%RHP_PROJECT_NAME%" -args[5] "%MDZIP_PATH%" -silent
    cd %PUBLISHER_DATA_PATH%\launch
  2. Replace <current_publisher_path> by the full path to the folder level that contains the publisher.exe file, for example:
    SET PUBLISHER_INSTALL_PATH=C:\Program Files\Publisher4Rhapsody\%PUB_VERSION%
  3. Replace <current_publisher_data_path> by the full path of the publisher properties, for example:
    SET PUBLISHER_DATA_PATH=C:\ProgramData\Publisher4Rhapsody\%PUB_VERSION%
  4. Replace <rhapsody_path> by the full path to the folder level that contains the rhapsody.exe file, for example:
    SET RHP_PATH=C:\Program Files\IBM\Rhapsody\10.0.1\

To run the script, you have by default to give it three parameters:

  1. The path to the MagicDraw model
  2. The path to the Rhapsody model. Note: If the folder already exists, the publication will not be done to avoid the loss of data.
  3. The Rhapsody model name
If the number of parameters has changed, you will have to feed the script according to the requested parameters.

Test the configurations

To test the modifications you can run the launch configuration from the publisher. Follow these steps:

  1. Run the Publisher for Rhapsodyâ„¢ by clicking the "publisher.exe" file.
  2. Deselect the working set "UML/SysML/UPDM" by setting the "No Working Set" menu.

  3. Run the service called "Execute Deployed Launch Configuration".

  4. Select the "MD2RhpSilent.main.launch" Launch Configuration in the launch folder. Fill all the parameters:
  5. Click the "Finish" button.