LegendService
Canonical path: NemAll_Python_BaseElements.LegendService
Implementation of the legend service
Methods:
-
CreateLegend–Overloaded function. See individual overloads.
-
GetLegendSize–Overloaded function. See individual overloads.
-
ShowLegendDialog–Show the legend dialog
-
__init__–Initialize
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:
-
doc(DocumentAdapter) –Document
-
placementPoint(Point2D) –Placement point
-
legendData(str) –Legend data (Section mumber; Path number)
-
selElements(BaseElementAdapterList) –Seleced elements
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:
-
Vector2D–Size of the legend
GetLegendSize(
doc: DocumentAdapter, legendData: str, selElements: BaseElementAdapterList
) -> Vector2D
Get the size of the legend created from the selected elements
Parameters:
-
doc(DocumentAdapter) –Document
-
legendData(str) –Legend data (Section mumber; Path number)
-
selElements(BaseElementAdapterList) –Selected elements
Returns:
-
Vector2D–Size of the legend
ShowLegendDialog
staticmethod
ShowLegendDialog(doc: DocumentAdapter, legendData: str) -> str
Show the legend dialog
Parameters:
-
doc(DocumentAdapter) –Document
-
legendData(str) –
Returns:
-
str–Legend dialog result as wstring (Section mumber; Path number)