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

Configuration of MD2RhpSilent.bat

The provided MD2RhpSilent.bat file do the following actions:

  1. Run the MagicDraw to Rhapsody transformation in the current opened Rhapsody project

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:
    SET MD2RHP_PATH=C:\Program Files\Publisher4Rhapsody\%PUB_VERSION%
    SET MD2RHP_DATA_PATH=C:\ProgramData\Publisher4Rhapsody\%PUB_VERSION%\
    SET MDZIP_PATH=%~1

    cd %MD2RHP_PATH%
    publisher.exe -headless -nosplash -launch "%MD2RHP_DATA_PATH%\launch\MD2RhpSilent.main.launch" -args[0] "%MDZIP_PATH%"

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:
    SET MD2RHP_PATH=<current_publisher_path>
    SET MDZIP_PATH=%~1

    cd %MD2RHP_PATH%
    publisher.exe -headless -nosplash -launch "%MD2RHP_PATH%\launch\MD2RhpSilent.main.launch" -args[0] "%MDZIP_PATH%"

  2. Replace <current_publisher_path> by the full path of the publisher, for example:
    SET MD2RHP_PATH=C:\Program Files\Publisher4Rhapsody\%PUB_VERSION%

Configure a menu in Rhapsody

Configuring a menu in Rhapsody helps exporting the current model in MagicDraw

  1. Select the menu Tools > Customize > Helpers...
  2. Create a new Menu Content, choose a name for the helper, for example : "MagicDraw to Rhapsody Publishing"
  3. Set the Command parameter: select the "publisher.exe" file of your Publisher installation, for example:
    C:\Program Files\Publisher4Rhapsody\3.1.0\publisher.exe
  4. Set the Arguments parameter to:
    -headless -nosplash --launcher.suppressErrors -launch "<current_publisher_path>\launch\MD2RhpSilent.main.launch" -args[0] "<magicdraw_input_file>"
    In these arguments, replace <current_publisher_path> by the Publisher path, for example:
    -headless -nosplash --launcher.suppressErrors -launch "C:\ProgramData\Publisher4Rhapsody\3.1.0\launch\MD2RhpSilent.main.launch" -args[0] "<magicdraw_input_file>"
    In these arguments, replace <magicdraw_input_file> by the MagicDraw model file path, for example:
    -headless -nosplash --launcher.suppressErrors -launch "C:\ProgramData\Publisher4Rhapsody\3.1.0\launch\MD2RhpSilent.main.launch" -args[0] "C:\Documents\MagicDrawModel.mdzip"
  5. Click "Ok" to complete the Helper creation.

You will now find the publishing shortcut in the Tools menu.

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 in the parameter mdzipPath with the path of your input MagicDraw file.

  5. Click the "Finish" button.