Skip to content

PlantUML Macros

c4.diagrams.core.Index

Represents an increment operation on the internal diagram index.

Optionally accepts an offset to increment by.

__init__

__init__(offset: int | None = None)

Parameters:

Name Type Description Default
offset int | None

Optional offset value to increment the index by.

None

c4.diagrams.core.LastIndex

Represents access to the last used diagram index.

Used to refer to the previously rendered index value.

c4.diagrams.core.SetIndex

Explicitly sets the relationship index to a new value.

This index operation resets the internal counter and returns a new index. It is typically used as an argument to Relationship to control relationship ordering explicitly.

__init__

__init__(new_index: int) -> None

Parameters:

Name Type Description Default
new_index int

The index value to assign.

required

c4.diagrams.core.increment

Bases: BaseDiagramElement

Diagram element representing an increment macro call.

Used to increment the internal index counter by a specified offset.

__init__

__init__(offset: int = 1)

Parameters:

Name Type Description Default
offset int

The amount to increment the index by. Defaults to 1.

1

c4.diagrams.core.set_index

Bases: BaseDiagramElement

Diagram element representing a setIndex PlantUML macro call.

Used to explicitly set the internal index counter to a given value.

__init__

__init__(new_index: int) -> None

Parameters:

Name Type Description Default
new_index int

The value to assign to the internal index.

required