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.1.

Configuration of Rhp2MDSilent.bat

The provided Rhp2MDSilent.bat file do the following actions:

  1. Start Rhapsody
  2. Open a project in Rhapsody
  3. Run the Rhapsody to MagicDraw transformation
  4. Close Rhapsody

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

  1. Open the file Rhp2MDSilent.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 (in second) to wait when starting Rhapsody.
    SET START_RHAPSODY_TIMEOUT=120

    REM The full path name of the Rhapsody project to publish.
    SET RHP_PROJECT_FULL_PATH_NAME=%~1
    REM The absolute path of the MagicDraw file that will be generated.
    SET MDZIP_PATH=%~2

    cd /d %PUBLISHER_INSTALL_PATH%
    publisher.exe -headless -nosplash -launch "%PUBLISHER_DATA_PATH%\launch\Rhp2MDSilent.main.launch" -args[0] "%RHP_PATH%" -args[1] "%HIDE_RHAPSODY_UI%" -args[2] "%START_RHAPSODY_TIMEOUT%" -args[3] "%RHP_PROJECT_FULL_PATH_NAME%" -args[4] "%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 two variables RHP_PROJECT_FULL_PATH_NAME and MDZIP_PATH are declared as parameters of this script. If needed, they can be hard coded following the comment just above.

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

  1. Open the file Rhp2MDSilent.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 full path name of the Rhapsody project to publish.
    SET RHP_PROJECT_FULL_PATH_NAME=%~1
    REM The absolute path of the MagicDraw file that will be generated.
    SET MDZIP_PATH=%~2

    cd /d %PUBLISHER_INSTALL_PATH%
    publisher.exe -headless -nosplash -launch "%PUBLISHER_DATA_PATH%\launch\Rhp2MDSilent.main.launch" -args[0] "%RHP_PATH%" -args[1] "%HIDE_RHAPSODY_UI%" -args[2] "%START_RHAPSODY_TIMEOUT%" -args[3] "%RHP_PROJECT_FULL_PATH_NAME%" -args[4] "%MDZIP_PATH%" -silent
    cd /d %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 two parameters:

  1. The full path name of the Rhapsody project to publish
  2. The absolute path of the MagicDraw file that will be generated
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 "Rhp2MDSilent.main.launch" Launch Configuration in the launch folder.

  5. Click the "Finish" button.