Skip to content

DrawingFileService

Canonical path: NemAll_Python_BaseElements.DrawingFileService

Bases: ExportImportService

Service for processing the drawing files

This class provides methods for changing the load state of drawing files (active in foreground, active in background or passive), as well as for changing the drawing-file-specific properties, such as scale.

Methods:

CreateBendingSchedule

CreateBendingSchedule(doc: DocumentAdapter, refPnt: Point2D)

Create a bending schedule

Parameters:

DeleteDocument

DeleteDocument(doc: DocumentAdapter)

Delete the context of the active document Args: doc: Document

ExportBendingMachine

ExportBendingMachine(
    doc: DocumentAdapter,
    fileName: str,
    project: str,
    plan: str,
    index: str,
    bSplitGroups: bool,
)

Export the reinforcement data for the bending machine

Parameters:

  • doc (DocumentAdapter) –

    Document

  • fileName (str) –

    Name of the output file

  • project (str) –

    Name of the project

  • plan (str) –

    Name of the plan

  • index (str) –

    Index as text

  • bSplitGroups (bool) –

    Split the reinforcement groups

GetActiveFileNumber staticmethod

GetActiveFileNumber() -> int

Get the drawing file number of the active document

GetFileState

GetFileState() -> list[tuple[int, DrawingFileLoadState]]

Get the file state of all loaded drawing files Returns: list with a tuple(file index, drawing file load state)

LoadFile

LoadFile(doc: DocumentAdapter, fileIndex: int, loadState: DrawingFileLoadState)

Load a drawing file

Parameters:

SetScalingFactor

SetScalingFactor(arg2: DocumentAdapter, arg3: float)

Set the scaling factor of the current document

Parameters:

  • arg2 (DocumentAdapter) –

    Document adapter

  • arg3 (float) –

    Scaling factor. For a scale of 1:20, set 20.0. For a scale 2:1, set 0.5

UnloadAll

UnloadAll(doc: DocumentAdapter)

Unload all drawing files

Parameters:

UnloadFile

UnloadFile(doc: DocumentAdapter, fileIndex: int)

Unload a drawing file

Parameters:

  • doc (DocumentAdapter) –

    Document

  • fileIndex (int) –

    Index of the drawing file

__init__

__init__()

Initialize