LayoutFileService
Canonical path: NemAll_Python_BaseElements.LayoutFileService
Service for processing the print layout files
This class provides methods for processing the print layouts, such as loading a specific print layout, assigning a print profile to it or exporting CAD data.
AssignPrintProfile
AssignPrintProfile(doc: DocumentAdapter, printProfile: str)
Set the print profile of the active document
Parameters:
-
doc
(DocumentAdapter
) –Document
-
printProfile
(str
) –Full name of the print profile
CreateMasterLayoutElement
CreateMasterLayoutElement(
doc: DocumentAdapter, layoutMasterData: LayoutMasterData
)
Create the master layout element
Parameters:
-
doc
(DocumentAdapter
) –Document
-
layoutMasterData
(LayoutMasterData
) –Layout master data
DeleteDocument
DeleteDocument(doc: DocumentAdapter)
ExportDWG
ExportDWG(
doc: DocumentAdapter,
layoutFileIndex: int,
fileName: str,
configFileName: str,
)
Export the data to a DWG file
Parameters:
-
doc
(DocumentAdapter
) –Document
-
layoutFileIndex
(int
) –Index of the layout file
-
fileName
(str
) –Name of the DWG file
-
configFileName
(str
) –Name of the DWG configuration file
ExportPDF
ExportPDF(
doc: DocumentAdapter,
layoutFileIndex: int,
fileName: str,
configFileName: str,
)
Export the data to a PDF file
Parameters:
-
doc
(DocumentAdapter
) –Document
-
layoutFileIndex
(int
) –Index of the layout file
-
fileName
(str
) –Name of the PDF file
-
configFileName
(str
) –Name of the PDF configuration file
ImportDWG
ImportDWG(
doc: DocumentAdapter, fileName: str, configFileName: str, placePnt: Point2D
) -> BaseElementAdapterList
Import the data from an DWG file
Parameters:
-
doc
(DocumentAdapter
) –Document
-
fileName
(str
) –Name of the DWG file
-
configFileName
(str
) –Name of the DWG configuration file
-
placePnt
(Point2D
) –Placement point of the data
InsertDrawingFile
InsertDrawingFile(
doc: DocumentAdapter,
fileIndexList: list,
placePnt: Point2D,
rotationAngle: float,
scale: float,
clipBoxLeftBottom: Point2D,
clipBoxRightTop: Point2D,
layerList: list[int] | VecIntList,
textFactor: float,
bUseRefPnt: bool,
refPnt: Point2D,
drawingMinMaxClipping: MinMax3D,
)
Insert drawing files in the layout file
Parameters:
-
doc
(DocumentAdapter
) –Document
-
fileIndexList
(list
) –List with the drawing file indices
-
rotationAngle
(float
) –Rotation angle
-
scale
(float
) –Scale
-
clipBoxLeftBottom
(Point2D
) –Left bottom point of the clipping box
-
clipBoxRightTop
(Point2D
) –Top right point of the clipping box
-
layerList
(list[int] | VecIntList
) –List with the insertion layers
-
textFactor
(float
) –Text factor
-
bUseRefPnt
(bool
) –Use the reference point for the placement
-
refPnt
(Point2D
) –Reference point of the drawing file
-
drawingMinMaxClipping
(MinMax3D
) –Min/max coordinates of the clipping area from the drawing file
LoadFile
staticmethod
LoadFile(doc: LayoutFileService, fileIndex: DocumentAdapter, loadState: int)
Load a layout file
Parameters:
-
doc
(LayoutFileService
) –Document
-
fileIndex
(DocumentAdapter
) –Index of the layout file