Bohemian - SysML Model Viewer¶
Bohemian is a SysML model viewer and IDL code generator for IBM Rhapsody projects. It provides a graphical interface for exploring SysML models and can automatically generate OMG IDL files suitable for DDS deployment in GVA systems.

Overview¶
Bohemian provides the following capabilities:
- Rhapsody Project Loading: Parse and display IBM Rhapsody
.rpyxproject files and.sbsxmodel files - Model Navigation: Tree-based navigation of packages, classes, types, and relationships
- Diagram Visualization: Interactive block diagram canvas showing class structures and dependencies
- IDL Code Generation: Export SysML models to OMG IDL format for DDS communication
- LDM Pattern Detection: Automatic detection of GVA Land Data Model patterns in models
Running Bohemian¶
Basic Usage¶
# Launch the GUI
./build/bin/bohemian
# Open a specific Rhapsody project
./build/bin/bohemian /path/to/project.rpyx
Command Line Options¶
| Option | Description |
|---|---|
-e, --export-idl <dir> |
Export IDL files to directory and exit (headless mode) |
-h, --help |
Display help information |
--version |
Display version information |
<project> |
Rhapsody project file (.rpyx) to open |
Headless IDL Export¶
For automated builds or CI/CD pipelines, Bohemian can export IDL files without launching the GUI:
# Export IDL from a project file
./build/bin/bohemian --export-idl ./output/idl /path/to/project.rpyx
# Export IDL from a directory of .sbsx files
./build/bin/bohemian --export-idl ./output/idl /path/to/model/directory
User Interface¶
Main Window Layout¶
The Bohemian interface consists of three main panels:
- Model Tree (left): Hierarchical view of all model elements
- Diagram Canvas (center): Visual representation of blocks and relationships
- Properties Panel (right): Detailed information about selected elements
Class Diagram View¶
The diagram canvas displays SysML blocks with their attributes, operations, and relationships:

Interaction Diagram View¶
Bohemian supports visualization of SysML interaction models (sequence diagrams) showing message flows between objects:

State Chart View¶
State machine diagrams display the behavioral states and transitions for classes:

View Controls¶
| Shortcut | Action |
|---|---|
Ctrl++ |
Zoom in |
Ctrl+- |
Zoom out |
Ctrl+0 |
Reset zoom to 100% |
Ctrl+F |
Zoom to fit all elements |
IDL Code Generation¶
Bohemian generates OMG IDL files following the GVA Translator Guide (Issue 1.2) mapping rules:
| SysML Element | IDL Output |
|---|---|
| Package | IDL module (P_<PackageName>) |
| Class | IDL struct (C_<ClassName>) |
| Enumeration Type | IDL enum (T_<TypeName>) |
| Structure Type | IDL struct (T_<TypeName>) |
| Typedef | IDL typedef |
| Attribute | Struct member (A_<AttributeName>) |
| Operation | Command struct (C_<ClassName>_<OpName>) |
Using the Export Dialog¶
- Open a Rhapsody project using File > Open Project or drag-and-drop
- Navigate the model tree to verify the structure
- Select File > Export IDL... to open the export dialog
- Choose the output directory
- Click Export to generate IDL files

Export Options¶
The IDL exporter supports several configuration options:
- Generate Comments: Include element descriptions from the model
- Generate @key Annotations: Add DDS key annotations for topic identification
- Generate DDS Annotations: Add
@appendable,@mutable,@autoid,@optionalannotations - Generate Topic Constants: Create
KC_*_TopicNameconstants for DDS topics - Generate Include Guards: Add
#ifndef/#defineheader guards
Building Generated IDL¶
After exporting IDL files, compile them using the AstuteDDS IDL compiler:
Using astutedds-idl¶
# Generate C++ code from exported IDL files
astutedds-idl -o ./generated/cpp -I ./ldm/UK/GVA/v10.0.0/IDL Alarms.idl
# Compile multiple IDL files with include paths
astutedds-idl -o ./generated/cpp \
-I ./ldm/UK/GVA/v10.0.0/IDL \
-I ./ldm/UK/GVA/Common \
Sensors.idl Actuators.idl
# Generate Python bindings
astutedds-idl -l python -o ./generated/python Alarms.idl
AstuteDDS IDL Compiler Options¶
| Option | Description |
|---|---|
-o <dir> |
Output directory for generated files (default: ./generated) |
-l <lang> |
Output language: cpp (default), c, python |
-I <dir> |
Add include search path (can be specified multiple times) |
-D <macro> |
Define a preprocessor macro |
-v |
Verbose output |
Using the LDM SDK Build System¶
Alternatively, the LDM SDK's CMake configuration will automatically compile IDL files:
Workflow Example¶
A typical workflow for using Bohemian with the LDM SDK:
- Design your data model in IBM Rhapsody using SysML
- Export the project to a
.rpyxfile - Open the project in Bohemian to verify the structure
- Generate IDL files using the Export function
- Place IDL files in the appropriate
ldm/directory - Build the LDM SDK to generate C++ types and Qt wrappers
- Use the generated
QtWrapper*PubSub.hclasses in your application
Troubleshooting¶
Project Won't Load¶
- Ensure the
.rpyxfile is a valid IBM Rhapsody project - Check that all referenced
.sbsxmodel files are accessible - Verify file permissions allow read access
IDL Export Fails¶
- Confirm the output directory exists and is writable
- Check for circular dependencies in the model
- Review the console output for specific error messages
Diagram Not Displaying¶
- Try View > Zoom to Fit to center the diagram
- Use View > Toggle Auto Layout to reorganize elements
- Check that the selected element has diagram content
Related Documentation¶
The following documents from the LOSA Portal provide additional context for working with SysML models and IDL generation:
| Document | Description |
|---|---|
| LDM Methodology and Modelling Standard Issue v1.9 | How to build PIMs following LDM conventions |
| GVA Translator Guide 2021 Issue 1.2 | PIM to PSM to IDL mapping rules |
| LDM Adopters Guide Issue v1.1 | Getting started with LDM adoption |
Access these documents at https://landopensystems.mod.gov.uk