LegendLV
Low-voltage legend with tabular cell structure.
Supports multi-row, multi-column text tables with cell merging for title blocks, revision tables, and diagram annotations.
Inherits from: DataClassJsonMixin
Import
python
from pyptp.elements.lv import LegendLVProperties
| Property | Type | Required | Default | Description |
|---|---|---|---|---|
general | General | No | (factory) | |
merges | list[str] | No | [] | |
cells | list[LegendCell] | No | [] | |
presentations | list[LegendPresentation] | No | [] |
General
Core properties for LV legends.
Encompasses identification and table dimensions (rows, columns).
| Property | Type | Required | Default | Description |
|---|---|---|---|---|
guid | Guid | No | (auto UUID) | |
creation_time | float | No | 0.0 | |
mutation_date | int | No | 0 | |
revision_date | int | No | 0 | |
rows | int | No | 1 | |
columns | int | No | 1 |
Referenced Types
General
Core properties for LV legends.
Encompasses identification and table dimensions (rows, columns).
Defined in pyptp.elements.lv.legend
| Property | Type | Required | Default | Description |
|---|---|---|---|---|
guid | Guid | No | (auto UUID) | |
creation_time | float | No | 0.0 | |
mutation_date | int | No | 0 | |
revision_date | int | No | 0 | |
rows | int | No | 1 | |
columns | int | No | 1 |
LegendCell
Individual cell within a legend table.
Contains row/column position, text formatting, and content lines.
Defined in pyptp.elements.lv.legend
| Property | Type | Required | Default | Description |
|---|---|---|---|---|
row | int | No | 1 | |
column | int | No | 1 | |
text_size | int | No | 20 | |
text_lines | list[str] | No | [] |
LegendPresentation
Visual presentation properties for legend display.
Defines position, dimensions, colors, and text formatting for rendering the legend on a sheet.
Defined in pyptp.elements.lv.legend
| Property | Type | Required | Default | Description |
|---|---|---|---|---|
sheet | Guid | No | (auto UUID) | |
x1 | int | No | 0 | |
y1 | int | No | 0 | |
x2 | int | No | 0 | |
y2 | int | No | 0 | |
color | DelphiColor | No | "$000000" | |
width | int | No | 1 | Thickness of the lines that draw the symbol. |
style | str | No | "Solid" | |
text_color | DelphiColor | No | "$000000" | Color of the text. |
text_size | int | No | 10 | Size of the text. |
font | str | No | "Arial" | |
text_style | int | No | 0 | |
no_text | bool | No | False | Hides all text when True. |
upside_down_text | bool | No | False | Makes text upside down when True. |