Skip to content

PlantUML Dynamic Index Helpers

This compatibility page documents PlantUML dynamic index helpers. The canonical API reference is PlantUML dynamic indexes.

c4.contrib.plantuml.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.contrib.plantuml.LastIndex

Represents access to the last used diagram index.

Used to refer to the previously rendered index value.

c4.contrib.plantuml.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.contrib.plantuml.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.contrib.plantuml.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

Deployment Node Variants

c4.contrib.c4_macros.NodeLeft

Bases: Node

Represents a deployment node aligned to the left in the diagram layout.

Typically used for directional positioning in deployment views.

c4.contrib.c4_macros.NodeRight

Bases: Node

Represents a deployment node aligned to the right in the diagram layout.

Useful for controlling horizontal positioning in deployment diagrams.

c4.contrib.plantuml.DeploymentNodeLeft

Bases: DeploymentNode

Represents a deployment node aligned to the left in the diagram layout.

Inherits both deployment semantics and directional positioning.

c4.contrib.plantuml.DeploymentNodeRight

Bases: DeploymentNode

Represents a deployment node aligned to the right in the diagram layout.

Useful for organizing infrastructure visually with directional context.