Skip to content

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.

Methods:

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:

DeleteDocument

DeleteDocument(doc: DocumentAdapter)

Delete the content of the active document

Parameters:

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(
    arg2: DocumentAdapter,
    doc: list,
    fileIndexList: Point2D,
    placePnt: float,
    rotationAngle: float,
    scale: Point2D,
    clipBoxLeftBottom: Point2D,
    clipBoxRightTop: list[int] | VecIntList,
    layerList: float,
    textFactor: bool,
    bUseRefPnt: Point2D,
    refPnt: MinMax3D,
)

Insert drawing files in the layout file

Parameters:

  • doc (list) –

    Document

  • fileIndexList (Point2D) –

    List with the drawing file indices placePnt Placement point

  • rotationAngle (float) –

    Rotation angle

  • scale (Point2D) –

    Scale

  • clipBoxLeftBottom (Point2D) –

    Left bottom point of the clipping box

  • clipBoxRightTop (list[int] | VecIntList) –

    Top right point of the clipping box

  • layerList (float) –

    List with the insertion layers

  • textFactor (bool) –

    Text factor

  • bUseRefPnt (Point2D) –

    Use the reference point for the placement

  • refPnt (MinMax3D) –

    Reference point of the drawing file

  • drawingMinMaxClipping

    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:

__init__

__init__()

Initialize