Skip to content

Drawing File Service

Class full path: NemAll_Python_BaseElements.DrawingFileService

Bases: ExportImportService

Functions

CreateBendingSchedule(doc, refPnt)

Create a bending schedule

Parameters:

Name Type Description Default
doc DocumentAdapter

Document

required
refPnt Point2D

Reference point of the bending schedule

required

DeleteDocument(doc)

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

ExportBendingMachine(doc, fileName, project, plan, index, bSplitGroups)

Export the reinforcement data for the bending machine

Parameters:

Name Type Description Default
doc DocumentAdapter

Document

required
fileName str

Name of the output file

required
project str

Name of the project

required
plan str

Name of the plan

required
index str

Index as text

required
bSplitGroups bool

Split the reinforcement groups

required

ExportDWG(doc, fileName, configFileName, version)

Export the data to a DWG file by a config file

Parameters:

Name Type Description Default
doc DocumentAdapter

Document

required
fileName str

Name of the DWG file

required
configFileName str

Name of the DWG configuration file

required
version float

Export version

required

ExportDWGByTheme(doc, fileName, themeFileName, placePnt) staticmethod

Export the data to a DWG file by a theme file

Parameters:

Name Type Description Default
doc DrawingFileService

Document

required
fileName DocumentAdapter

Name of the DWG file

required
themeFileName str

Name of the DWG theme file

required
placePnt str

Placement point of the data

required

GetActiveFileNumber() staticmethod

Get the drawing file number of the active document

GetFileState()

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

ImportDWG(doc, fileName, configFileName, placePnt)

Import the data from an DWG file

Parameters:

Name Type Description Default
doc DocumentAdapter

Document

required
fileName str

Name of the DWG file

required
configFileName str

Name of the DWG configuration file

required
placePnt Point3D

Placement point of the data

required

LoadFile(doc, fileIndex, loadState)

Load a drawing file

Parameters:

Name Type Description Default
doc DocumentAdapter

Document

required
fileIndex int

Index of the drawing file

required
loadState DrawingFileLoadState

File load state

required

SetScalingFactor(doc, scalingFactor)

Set the scaling factor of the current document Args: doc: Document adapter scalingFactor: Scaling factor

UnloadAll(doc)

Unload all drawing files

Parameters:

Name Type Description Default
doc DocumentAdapter

Document

required

UnloadFile(doc, fileIndex)

Unload a drawing file

Parameters:

Name Type Description Default
doc DocumentAdapter

Document

required
fileIndex int

Index of the drawing file

required

__init__()

initialize