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:
- Create a project with 2 or more components and a <<usage>> dependency from one component to another
- Create 2 classes and ensure that you have one class in scope of one component and the other class in scope of another component
- Create a dependency from one class to the other class (You may have member functions and attributes in the classes)
- Close Rhapsody
- Open command line (Start > Run > cmd) and navigate to Rhapsody installation directory
- 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 Synonym
Rational Rhapsody
Was this topic helpful?
Document Information
Modified date:
27 May 2022
UID
swg21642263