Where to change?
One of the cool features of Rhapsody is the large number of properties that allow you to configure many things to your needs.
One of the scariest features is the large number of properties that allow you to really make a mess of your model….
The truth here is somewhere in the middle. Properties are definitely very cool but should be used with care.
- Do not use Factory.prp or Factory<Lang>.prp to let Rhapsody use your properties. Not never…. Every installation uses its own Factory files and they can be changed so copying them from an old installation is not an option. It is called “Factory” for a reason.
- If you really have to change something globally, please use the “Include” statement in the prp files so that your properties are stored independent of the Rhapsody installation.
- Using changes in Site or Factory are not really the best way of doing stuff. You have to install the same files on _every_ workstation in your organization otherwise it is possible that you are confronted with unwanted behavior.
- Properties belong in a profile so that you can load many settings in one go. You can store the profiles under the Rhapsody Share directory (Share\properties). When you create a txt file with the same base name as the property file you can add a description and the “New Project” Dialog will show your property file under “Settings”
- Not all properties can be set in a profile, model level properties for instance cannot be set on profile level.
Limit Roundtrip errors
A default setting in Rhapsody that really does not make any sense is the Roundtrip settings. Default Rhapsody lets you change whatever you want and hides the results for you. I’ve had crying man on the phone that were desperate while Rhapsody generated code that they could not understand. The default is OK for Rhapsody Experts, they know what to expect but for newbies it is just wrong.
Browser::Settings::ShowSourceArtifacts to TRUE and
C_Roundtrip::General::RoundtripScheme to Basic
That will limit your changes to what you can change anyway (Function contents and other stuff that is between /*#[ …. */ and /*#]*/
Curves are nice but in different types of models. Not in UML models. For reasons beyond our understanding IBM has chosen curved as default. There are a lot of properties involved to cure that. This is done best in a profile. In Subject “StatechartDiagram” you can find al the properties you need.
StatechartDiagram::Transition::line_style set to rectilinear (or rounded_rectilinear)
I think you can handle the rest of the properties yourself. Another that is useful is:
StatechartDiagram::Requirement::RequirementNotation set to Box_style if you want.
ObjectModelGe::Requirement::ShowAnnotationContents can be set to “Specification” because that is what you want to see.
As you see, all model elements have properties in different diagram types, yes… you have to change them all. A bit of work but very rewarding!
User defined Types
When using your own types you will notice that the PreDefinedTypes packages stay there (and cannot be deleted). You can however hide them with:Browser::Settings::ShowPredefinedPackage to False.
Then you can either create a package with your own types, or use a package with external types and include <stdint.h> to use C99 (or define C++ stdint types)
Change: General::Model::CommonTypes and add your own type packages (Use fully qualified names when using subpackages!, multiple packages can be separated by ‘,’) to have only your own types when selecting the type for attributes or arguments etc. In General::Model::DefaultType you can set the default (“TypePkg::Type”).
Happy Modeling with Rhapsody!
Walter van der Heiden (firstname.lastname@example.org)