IBM Support

Command Line to regenerate code of multiple components with dependencies in Rational Rhapsody

Question & Answer


Question

What parameters you need to pass using Command Line to generate multiple components with dependencies in IBM Rational Rhapsody?

Cause

The commands to generate with dependencies and to regenerate a component but not the combination of both in Rational Rhapsody is as follows.

Example:


-cmd=generate compA cfg1 -cmd=generate compA cfg2 -cmd=generate compB cfg1                                                
-cmd=genwithdep                                                        
-cmd=regenerate compA cfg1 -cmd=regenerate compA cfg2

Answer

You can use the command -cmd=regenwithdep cmp_name cfg_name in Rational Rhapsody in order to regenerate the components with dependencies.


Example:

  1. Create a project with 2 or more components and a <<usage>> dependency from one component to another

  2. Create 2 classes and ensure that you have one class in scope of one component and the other class in scope of another component

  3. Create a dependency from one class to the other class (You may have member functions and attributes in the classes)

  4. Close Rhapsody

  5. Open command line (Start > Run > cmd) and navigate to Rhapsody installation directory

  6. Use the below set of commands in order to generate and regenerate code

    • C:\Program Files\IBM\Rational\Rhapsody\7.5.3>rhapsody.exe -lang=cpp    
      -cmd=open "C:\Program Files\IBM\Rational\Rhapsody\7.5.3\RhapsodyCL\RhapsodyCL.rpy"    
      -cmd=generate component_0 DefaultConfig


    • C:\Program Files\IBM\Rational\Rhapsody\7.5.3>rhapsody.exe -lang=cpp    
      -cmd=open "C:\Program Files\IBM\Rational\Rhapsody\7.5.3\RhapsodyCL\RhapsodyCL.rpy"    
      -cmd=genwithdep component_0 DefaultConfig


    • C:\Program Files\IBM\Rational\Rhapsody\7.5.3>rhapsody.exe -lang=cpp    
      -cmd=open "C:\Program Files\IBM\Rational\Rhapsody\7.5.3\RhapsodyCL\RhapsodyCL.rpy"                                                            
      -cmd=regenwithdep component_0 DefaultConfig

[{"Product":{"code":"SSB2MU","label":"IBM Engineering Systems Design Rhapsody"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"General Information","Platform":[{"code":"PF033","label":"Windows"}],"Version":"8.0;8.0.1;8.0.2;7.6.1.3;7.6.1.2;7.6.1.1;7.6.1;7.6.0.1;7.6","Edition":"","Line of Business":{"code":"LOB59","label":"Sustainability Software"}}]

Product Synonym

Rational Rhapsody

Document Information

Modified date:
27 May 2022

UID

swg21642263