In general, the following types of commands cannot be used with RhapsodyCL: diagram commands, configuration management commands, commands for running macros.
If you try to use a non-supported command with RhapsodyCL, the behavior of RhapsodyCL depends on whether you have set the -verbose switch:
For more information about the -verbose switch, see Command-line switches
Adds to the current model from the specified file location. The default value is <withoutdescendants>.
(cannot be used with RhapsodyCL.exe)
Builds a component with all its dependencies.
Calls one of the Rational® Rhapsody® plug-ins and forwards the provided parameters to the plug‑in.
In contrast to all the other commands, the parameters for this command are provided as a single string enclosed in quotation marks (which are removed during processing). The first parameter in the string specifies the plug-in that is being called. The remainder of the string contains any parameters to be sent to the plug-in. You can send as many parameters to the plug-in as you want, but keep in mind that a parameter cannot contain spaces.
The following example shows the call command used to run TestConductor, where the plug-in name is "rtc":
For example:D:\RhapsodyModels\Pbx.PBX.rpt -cmd=call "rtc run all"
For more information about calling .dll plug-ins, see http://www.ibm.com/support/docview.wss?uid=swg21411451.
To learn how to load a .dll plug-in into your Rational Rhapsody project, see http://www.ibm.com/support/docview.wss?uid=swg21411455.
(cannot be used with RhapsodyCL.exe)
Checks in a unit to an archive. If you do not want to specify a <label/revision>, use NULL.
For example, -cmd=checkin p1.sbs NULL locked recursive "my description"
(cannot be used with RhapsodyCL.exe)
Checks out a unit from the archive. If you do not want to specify a <label/revision>, use NULL.
Closes the open Rational Rhapsody model. By default, Rational Rhapsody automatically saves any changes you have made to the model before closing. If you do not want the product to save changes upon closing, use the NoSave parameter.
(cannot be used with RhapsodyCL.exe)
The first parameter specifies the type of diagram. This parameter can take one of the following values: omd, ucd, msc, collaboration, component.
The second parameter is the name of the diagram in the model.
(cannot be used with RhapsodyCL.exe)
Connects to an archive. <archive location> includes the full path.
(cannot be used with RhapsodyCL.exe)
The first parameter specifies the type of diagram. This parameter can take one of the following values: omd, ucd, msc, collaboration, component.
The second parameter is the name of the diagram in the model.
Generates code for the specified component and configuration.
<component> and <configuration> are optional parameters. If not specified, the active component and configuration are used. Like the generate option in the GUI, this generates code only for modified elements. To regenerate all code, use the -regenerate command.
For example, -cmd=generate EXE Acme
If you want to generate code for more than one component, or for more than one configuration for a given component, you must repeat the generate command for each component/configuration combination, for example:
-cmd=generate compA cfg1 -cmd=generate compA cfg2 -cmd=generate compB cfg1
If you want to generate code for a nested component, use the syntax outerComponent::innerComponent, for example:
Generates a component with all its dependencies.
Sends the result of the last command that was run to the standard output (or via the relevant socket in socket mode).
This command can only be used with RhapsodyCL.
Imports classes according to the reverse engineering settings stored in the current configuration. This command is equivalent to selecting in Rational Rhapsody.
Builds the application, using the current configuration.
Make is an asynchronous command and must be the last of all commands in a script.
Because exit is a synchronous command, you cannot follow a make command with an exit (to close your project and exit Rational Rhapsody); doing so will cause the make to cease prematurely.
If you plan to run the application right after the make, use -syncmake instead of -make. This waits for the make to complete before running any additional commands.
Creates a project in the specified location and assigns it the specified name.
Opens the specified project. (RhapsodyCL.exe can only open projects. Rhapsody.exe can open units as well.)
(cannot be used with RhapsodyCL.exe)
The first parameter specifies the type of diagram. This parameter can take one of the following values: omd, ucd, msc, collaboration, component.
The second parameter is the name of the diagram in the model.
(cannot be used with RhapsodyCL.exe)
Populates the specified diagram.
The first parameter specifies the type of diagram. This parameter can take one of the following values: omd, ucd, msc, collaboration, component.
The second parameter is the name of the diagram in the model.
If model elements have been modified, generates code for the specified component and configuration.
<component> and <configuration> are optional parameters. If not specified, the active component and configuration are used.
If you want to generate code for more than one component, or for more than one configuration for a given component, you must repeat the regenerate command for each component/configuration combination, for example:
-cmd=regenerate compA cfg1 -cmd=regenerate compA cfg2 -cmd=regenerate compB cfg1
If you want to regenerate code for a nested component, use the syntax outerComponent::innerComponent, for example:
<format> is the report format (RTF or ASCII). The file extension is added automatically (.rtf for RTF and .txt for ASCII).
<name + location> specifies the name and location of the report. These parameters are optional.
If you do not specify a name, the default file name is used (RhapsodyRep.rtf).
If you do not specify a location, the default location is used (the project directory).
Set the current configuration before issuing this command.
For example, -cmd=report RTF myReport
For RhapsodyCL, the report command uses the Rational Rhapsody internal reporter and does not extract diagrams.
Runs the specified external program.
(with RhapsodyCL.exe, cannot be used to run COM-based programs.)
Saves the open project. Can be used after making changes like roundtrip, reverse engineering.
Saves the project to a specified location. <project name> can include the path.
If you want to make a nested component the active component, use the syntax outerComponent::innerComponent, for example:
Redirects the output normally sent to the output window to the specified log file. If the parameter does not specify the path, the log file is put in the "current" Rational Rhapsody directory. If a log file is specified, output is not sent to the standard output.