FrameLV
Frame element for grouping and organizing components in low-voltage networks.
A frame is a visual container (rectangle, polygon, or ellipse) in the one-line diagram that indicates components belong together, such as components of a substation. When the container property is enabled, nodes and texts placed entirely within the frame are kept together when dragging the frame.
The frame has no influence on electrical calculations - it is purely organizational. Frames can contain nodes, texts, legends, and even other frames. Components must fit entirely within the frame boundaries to be considered contained.
Supports three shapes:
- Rectangle (default)
- Polygon (with bendable corners)
- Ellipse
- Image-based frame (size determined by image)
Import
from pyptp.elements.lv import FrameLVProperties
| Property | Type | Required | Default | Description |
|---|---|---|---|---|
general | General | Yes | - | |
presentations | list[FramePresentation] | Yes | - | |
lines | list[str] | No | [] | |
extras | list[Extra] | No | [] | |
geo_series | list[Geography] | No | [] |
FramePresentation
Visual presentation properties for displaying the frame on a sheet.
Controls the graphical appearance including shape, colors, line style, text formatting, and positioning on the network diagram.
| Property | Type | Required | Default | Description |
|---|---|---|---|---|
sheet | Guid | No | NIL_GUID | Sheet GUID where this presentation is displayed. |
sort | FrameShape | No | RECTANGLE | Frame shape type. |
name_x | int | No | 0 | X offset of the text relative to the weighted centre of the frame. |
name_y | int | No | 0 | Y offset of the text relative to the weighted centre of the frame. |
filled | bool | No | False | Whether the frame interior is filled with a background color. |
fill_color | DelphiColor | No | "$FF0000" | Background fill color when filled is True. |
image_size | int | No | 100 | Scaling factor for the background image (100 = original size). |
color | DelphiColor | No | "$FF0000" | Border/outline color of the frame. |
width | int | No | 1 | Line width of the frame border. |
style | LineStyle | No | SOLID | Line style for the frame border. |
text_color | DelphiColor | No | "$000000" | Color of the frame's text label. |
text_size | int | No | 10 | Font size for the frame's text label. |
font | str | No | "Arial" | Font family for the frame's text label. |
text_style | int | No | 0 | Font style flags (bold, italic, etc.). |
no_text | bool | No | False | Hides all text when True. |
upside_down_text | bool | No | False | Makes text upside down when True. |
strings_x | int | No | 0 | X offset of the text relative to object. |
strings_y | int | No | 0 | Y offset of the text relative to object. |
first_corners | list[tuple] | No | [] |
General
Core properties defining the frame element.
Contains identification, naming, and behavioral properties that determine how the frame interacts with contained components.
| Property | Type | Required | Default | Description |
|---|---|---|---|---|
guid | Guid | No | (auto UUID) | |
creation_time | float | int | No | 0 | |
mutation_date | int | No | 0 | |
name | str | No | "" | User-defined name for the frame element. |
revision_date | float | int | No | 0.0 | |
image | str | No | "" | Path or URL to an image file used as the frame background. |
container | bool | No | False | Whether contained objects move together with the frame when dragged. |
Referenced Types
General
Core properties defining the frame element.
Contains identification, naming, and behavioral properties that determine how the frame interacts with contained components.
Defined in pyptp.elements.lv.frame
| Property | Type | Required | Default | Description |
|---|---|---|---|---|
guid | Guid | No | (auto UUID) | |
creation_time | float | int | No | 0 | |
mutation_date | int | No | 0 | |
name | str | No | "" | User-defined name for the frame element. |
revision_date | float | int | No | 0.0 | |
image | str | No | "" | Path or URL to an image file used as the frame background. |
container | bool | No | False | Whether contained objects move together with the frame when dragged. |
FramePresentation
Visual presentation properties for displaying the frame on a sheet.
Controls the graphical appearance including shape, colors, line style, text formatting, and positioning on the network diagram.
Defined in pyptp.elements.lv.frame
| Property | Type | Required | Default | Description |
|---|---|---|---|---|
sheet | Guid | No | NIL_GUID | Sheet GUID where this presentation is displayed. |
sort | FrameShape | No | RECTANGLE | Frame shape type. |
name_x | int | No | 0 | X offset of the text relative to the weighted centre of the frame. |
name_y | int | No | 0 | Y offset of the text relative to the weighted centre of the frame. |
filled | bool | No | False | Whether the frame interior is filled with a background color. |
fill_color | DelphiColor | No | "$FF0000" | Background fill color when filled is True. |
image_size | int | No | 100 | Scaling factor for the background image (100 = original size). |
color | DelphiColor | No | "$FF0000" | Border/outline color of the frame. |
width | int | No | 1 | Line width of the frame border. |
style | LineStyle | No | SOLID | Line style for the frame border. |
text_color | DelphiColor | No | "$000000" | Color of the frame's text label. |
text_size | int | No | 10 | Font size for the frame's text label. |
font | str | No | "Arial" | Font family for the frame's text label. |
text_style | int | No | 0 | Font style flags (bold, italic, etc.). |
no_text | bool | No | False | Hides all text when True. |
upside_down_text | bool | No | False | Makes text upside down when True. |
strings_x | int | No | 0 | X offset of the text relative to object. |
strings_y | int | No | 0 | Y offset of the text relative to object. |
first_corners | list[tuple] | No | [] |