• 2 replies
  • Latest Post - ‏2013-11-05T15:01:04Z by ultimatejoker
1 Post

Pinned topic RhapsodyCL.exe and Generate "Entire Project"

‏2013-10-25T18:20:58Z |

I am using Rhapsody and its RhapsodyCL.exe (command line tool) to automate the code generation of a project. The project has the layout shown below; it consists of one main component and multiple sub-components.

- Components
--+ comp1
----+ Components
-------+ subComp1
-------+ subComp2
-------+ subComp3
- Configurations
--+ config1

I am able to generate the code for the main configuraiton "config1" using the command (this does not generate the code for any of the sub-components):

> RhapsodyCL.exe -cmd=open <path to Project.rpy> -cmd=generate

I can also generate the code for any of the sub-components using a similar command:

> RhapsodyCL.exe -cmd=open <path to Project.rpy> -cmd=generate Component1::subComp1 Component1::subComp2 Component1::subComp3 (etc...)

If I have 100 subcomponents it is not feasible to have 100 command line options to build each sub-component; this of course could be scripted itslef to build each one individually but I am trying to avoid that approach. There is a command in the Rhapsody GUI to generate the "Entire Project" which does in fact generate the code for all of the necessary components and sub-components in the project. Does anyone know of a command line equivalent for this? IBM site on the rhapsody command line ( doesn't mention a generate "entire project" option.

  • JeanZ
    303 Posts

    Re: RhapsodyCL.exe and Generate "Entire Project"



    Unfortunately, as what you have observed, there is no easy way to make Rhapsody generate code for the whole projects by calling command line RhapsodyCL.exe. You have to provide each component and configuration name in the command parameters like below which is frustrating to everyone.

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


    Probably you could consider to use Rhapsody Java API, actually it's handy and simply to call IRPApplication.generateEntireProject() API.

    Hope above helps.



  • ultimatejoker
    12 Posts

    Re: RhapsodyCL.exe and Generate "Entire Project"


    If there are dependencies between the components, you can try this:


    Generates a component with all its dependencies.