Skip to content

Derived diagram elements🔗

With capellambse-context-diagrams v0.2.36 a separate context is built. The elements are derived from the diagram target, i.e. the system of interest on which context_diagram was called on. The render parameter to enable this feature is called display_derived_interfaces and is available on:

  • LogicalComponents and
  • SystemComponents

Context Diagram with derived elements

from capellambse import MelodyModel

lost = model.by_uuid("0d18f31b-9a13-4c54-9e63-a13dbf619a69")
diag = obj.context_diagram
diag.render(
    "svgdiagram", display_derived_interfaces=True
).save(pretty=True)
Context diagram of Center with derived context

See the derivator functions to gain an overview over all supported capellambse types and the logic to derive elements.