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

Configuration of Rhp2MDSilent.bat

The provided Rhp2MDSilent.bat file do the following actions:

  1. Launch 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:
    SET RHP2MD_PATH=C:\Program Files\Publisher4Rhapsody\%PUB_VERSION%
    SET RHP2MD_DATA_PATH=C:\ProgramData\Publisher4Rhapsody\%PUB_VERSION%\
    SET RHP_PATH=D:\apps\IBM\Rhapsody\9.0.2\
    SET RHP_PROJECT_PATH=<rhapsody_project_path> start "" "%RHP_PATH%\rhapsody.exe" -cmd=open %RHP_PROJECT_PATH%
    start /wait timeout 120
    cd /d %RHP2MD_PATH%
    publisher.exe -clean -headless -nosplash --launcher.suppressErrors -launch "%RHP2MD_DATA_PATH%\launch\Rhp2MDSilent.main.launch"
    Taskkill /IM Rhapsody.exe /F

  2. Replace the <rhapsody_project_path> by the full path to the project (rpy file) to transform, for example:
    SET RHP_PROJECT_PATH=C:\ProgramData\IBM\Rational\Rhapsody\9.0.2\Samples\SystemSamples\SysMLHandset\SysMLHandset.rpy

  3. Optional : If the Rhapsody project is large, you may have to increase the delay before transforming to MagicDraw:
    start /wait timeout 120

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:
    SET RHP2MD_PATH=<current_publisher_path>
    SET RHP_PATH=<rhapsody_path>
    SET RHP_PROJECT_PATH=<rhapsody_project_path>
    start "" "%RHP_PATH%\rhapsody.exe" -cmd=open %RHP_PROJECT_PATH%
    start /wait timeout 120
    "%RHP2MD_PATH%\publisher.exe" -headless -nosplash --launcher.suppressErrors -launch "%RHP2MD_PATH%\launch\Rhp2MDSilent.main.launch"
    Taskkill /IM Rhapsody.exe /F

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

  3. Replace <rhapsody_path> by the full path to the rhapsody folder, for example:
    SET RHP_PATH=D:\apps\IBM\Rhapsody\9.0.2

  4. Replace the <rhapsody_project_path> by the full path to the project (rpy file) to transform, for example:
    SET RHP_PROJECT_PATH=C:\ProgramData\IBM\Rational\Rhapsody\9.0.2\Samples\SystemSamples\SysMLHandset\SysMLHandset.rpy

  5. Optional : If the Rhapsody project is large, you may have to increase the delay before transforming to MagicDraw:
    start /wait timeout 120

Configure the MagicDraw output file

The MagicDraw output file can be configured by setting the rhp2md.md.path option in the publisher.ini file.

  1. Open the file publisher.ini, located in the publisher install path, in a text editor.
    You will need administrator rights to update "publisher.ini", if the Publisher for Rhapsody has been installed in default folder "c:\Program Files\".
  2. Add a new line at the end of the file. You can choose any output path that fits your needs. For example:
    -Drhp2md.md.path=C:\temp\mdexport.mdzip

If the -Drhp2md.md.path property is not set, the MagicDraw file will be created in the %USER%\.rhp2md\com.sodius.mdw.interop.rhp_md_sysml\mdzips folder, where %USER% represents the User folder.

If the -Drhp2md.md.path property is set to an existing folder, the MagicDraw file will be created in the set folder.

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 : "Rhapsody to MagicDraw Publishing"
  3. Set the Command parameter: select the "publisher.exe" file of your Publisher installation, for example:
    C:\Program Files\Publisher4Rhapsody\3.2.1\publisher.exe
  4. Set the Arguments parameter to:
    -headless -nosplash --launcher.suppressErrors -launch "<current_publisher_path>\launch\Rhp2MDSilent.main.launch"
    In these arguments, replace <current_publisher_path> by the Publisher path, for example:
    -headless -nosplash --launcher.suppressErrors -launch "C:\ProgramData\Publisher4Rhapsody\3.2.1\launch\Rhp2MDSilent.main.launch"
  5. Set the Project Type parameter to SysML.
  6. 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 "Rhp2MDSilent.main.launch" Launch Configuration in the launch folder.

  5. Click the "Finish" button.