Silent Mode Configuration

The configuration files are located in the publisher install path, under the folder "launch".

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:

  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 50
    "%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:\temp\rhp2md-publisher-win32-x86_64_2.0.1-SNAPSHOT

  3. Replace <rhapsody_path> by the full path to the rhapsody folder, for example:
    SET RHP_PATH=C:\Program Files\IBM\Rational\Rhapsody\8.3.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\8.3.2x64\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 50

Configure the MagicDraw output file

The MagicDraw output file can be configured by setting the "" argument in the publisher.ini file.

  1. Open the file publisher.ini, located in the publisher install path, in a text editor.
  2. Add a new line at the end of the file. You can choose any output path that fits your needs. For example:\temp\mdexport.mdzip

If the 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 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 : "RHP2MD Publishing"
  3. Set the Command parameter: select the "publisher.exe" file of your Publisher installation, for example:
  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:\temp\rhp2md-publisher-win32-x86_64_2.0.1-SNAPSHOT\launch\Rhp2MDSilent.main.launch"
  5. Set the Project Type parameter toSysML.
  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" 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.