Friday 8 January 2021

IBM Engineering Rhapsody Tip #91 - Recap on the OMROOT variable and Share folder (Intermediate)

Welcome to 2021! In this short tips and tricks video I cover a topic that relates to how to set-up Rhapsody in a team environment. Typical use cases for this are where you might have customized the OxF (framework) libraries and model to remove or add code, or where you have user-defined profiles that you want all users to get updates for (because they're opening the same projects). Essentially this can be done by copying the Share folder from a local installation location to a shared network drive location, and then changing the rhapsody.ini file to point to it for all users that need it.  Of course, the caveat is that all users will need access to the folder. The drive path can be different, of course, because the OMROOT variable that points to it is in the rhapsody.ini file. This .ini file is part of the read/write component of the Rhapsody installation and the default OMROOT would've been set-up during the install. Enjoy. Hope it helps.

Here's the transcript (for those that need it):

This short caption-only tips and tricks video is quick reminder of what Rhapsody's $OMROOT variable is.

Let's start by creating a project with a pre-defined project type of SysML.

The SysML profile's unit is added by reference (REF). The path for the file starts with $OMROOT, a Rhapsody environment variable that is set up during installation.

The OMPATH path is setup in the rhapsody.ini file created in the read/write part of the installation. This file is editable, but always backup the .ini file before editing, and never edit when Rhapsody is open, as it’s a file that Rhapsody both reads and writes to.

If we wanted to move the OMROOT then we could. It points to something called the Share folder. The Share folder contains many important aspects of the Rhapsody installation including profiles, properties and settings, as well as framework code libraries used for model execution. E.g., here is the unit (file) for the SysML profile referenced by our project. 

Importantly, we may want to customise aspects of Rhapsody, such as the Framework code (OxF), or adding new settings or plugins. One way to enable all users to access these changes is to copy the Share folder to a network folder location that all users can access. 

We can then change the OMROOT in the .ini file for all the users to point to the network Share folder location. Remember, don't edit the .ini file while Rhapsody is open otherwise there's a risk of corruption.

The benefit of the shared location is that updating user-defined profiles, recompiling and linking framework code can be done centrally. To illustrate, I'll add this helper profile that I downloaded from my Github project. It's got a range of different profiles and plugins for different SysML project types. By adding it to the Share > Profiles subfolder, users with their OMROOT changed will be able to open projects that use the profile. The list of project types is now much wider than the factory set.

The project has referenced my project profile and plugin, including adding new right-click menu commands. The user-defined profile is being referenced from the Share folder that can be on a shared drive. Of course, if you can't access the drive then Rhapsody will complain when you try to open it.

If you're moving your machine to different locations then make sure the drive will still be accessible!

In summary, the OMROOT variable points to the Share folder. If you want to customize Share folder contents for all users then one way is to move it to a cental location and change their rhapsody.ini files to point to it.

Hope that helps. If you do have any questions about Rhapsody or want consultancy or training on how to customize and set-up to get high level value quickly, then feel free to email me.

No comments:

Post a Comment

Note: only a member of this blog may post a comment.