Skip to content

LegendService

Canonical path: NemAll_Python_BaseElements.LegendService

Implementation of the legend service

Methods:

CreateLegend overloaded

CreateLegend(
    doc: DocumentAdapter,
    placementPoint: Point2D,
    legendData: str,
    drawingFiles: list[int] | VecIntList,
    hiddenLayers: VecUShortList,
)

Create the legend from the elements of the drawing files

Parameters:

  • doc (DocumentAdapter) –

    Document

  • placementPoint (Point2D) –

    Placement point

  • legendData (str) –

    Legend data (Section mumber; Path number)

  • drawingFiles (list[int] | VecIntList) –

    Drawing files

  • hiddenLayers (VecUShortList) –

    Hidden layers

CreateLegend(
    doc: DocumentAdapter,
    placementPoint: Point2D,
    legendData: str,
    selElements: BaseElementAdapterList,
)

Create the legend from the selected elements

Parameters:

GetLegendSize overloaded

GetLegendSize(
    doc: DocumentAdapter,
    legendData: str,
    drawingFiles: list[int] | VecIntList,
    hiddenLayers: VecUShortList,
) -> Vector2D

Get the size of the legend defined by elements from the drawing files

Parameters:

  • doc (DocumentAdapter) –

    Document

  • legendData (str) –

    Legend data (Section mumber; Path number)

  • drawingFiles (list[int] | VecIntList) –

    Drawing files

  • hiddenLayers (VecUShortList) –

    Hidden layers

Returns:

GetLegendSize(
    doc: DocumentAdapter, legendData: str, selElements: BaseElementAdapterList
) -> Vector2D

Get the size of the legend created from the selected elements

Parameters:

Returns:

ShowLegendDialog staticmethod

ShowLegendDialog(doc: DocumentAdapter, legendData: str) -> str

Show the legend dialog

Parameters:

Returns:

  • str

    Legend dialog result as wstring (Section mumber; Path number)

__init__

__init__()

Initialize

Placeholder