Command-line Launcher
Rhapsody supports command-line via a script file as described here: https://www.ibm.com/support/knowledgecenter/SSB2MU_9.0.0/com.ibm.rhp.api.doc/topics/rhp_c_ext_cmdl_interface.html
The M2M command line can be inserted in a Rhapsody script as below:
call_extended "M2M" "-filePath 'D:/ TestTransformer.rpyx' -ruleset 'SysmlToAR431' -traceability true"
All arguments are optional, and if there is no ruleset argument, the engine will take the first M2MRuleset it found in the model:
-
ruleset [full path name of the M2MRuleset in Rhapsody]: this is the full path name of the M2MRuleset which must be applied on the model for transformation. A project can contain multiple M2MRulesets, so only one must be selected.
-
filePath [.rpyx file path]: this argument is for the path where the project will be saved and transformed. If the argument is not in the command, the transformation will be done in the source project.
-
displaySourceTarget [‘True’, ‘False’]: this argument must be set to true if you need to display both the source model, and the target (transformed) model.
-
targetPackageName [Package name]: this argument is only useful when ‘displaySourceTarget’ is ‘True’. In this case, the target model is built in a root Package named by the value of this argument.
-
traceabilityReport [‘True’, ‘False’]: this argument is to choose if the transformed project will keep the source model.