Skip to content

ExportImportService

Canonical path: NemAll_Python_BaseElements.ExportImportService

Service for exporting/importing CAD data in common formats, like IFC or DWG.

During the import, the objects are directly created in the current drawing file. To prevent that and get Python objects first, use the utility CadDataFileReader.

ExportDWG

ExportDWG(
    doc: DocumentAdapter, fileName: str, configFileName: str, version: int
)

Export the data to a DWG file by a configuration file

Parameters:

  • doc (DocumentAdapter) –

    Document

  • fileName (str) –

    Name of the DWG file

  • configFileName (str) –

    Name of the DWG configuration file

  • version (int) –

    Version numer

ExportDWGByTheme

ExportDWGByTheme(
    doc: DocumentAdapter, fileName: str, themeFileName: str, version: int = 2018
)

Export the data to a DWG file by a theme file

Parameters:

  • doc (DocumentAdapter) –

    Document

  • fileName (str) –

    Name of the DWG file

  • themeFileName (str) –

    Name of the DWG theme file

  • version (int, default: 2018 ) –

    DWG version

ExportIFC

ExportIFC(
    doc: DocumentAdapter,
    fileNumbers: list[int] | VecIntList,
    ifcVersion: IFC_Version,
    fileName: str,
    ifcThemeFileName: str = "",
)

Export the data to an IFC file

Parameters:

  • doc (DocumentAdapter) –

    Document

  • fileNumbers (list[int] | VecIntList) –

    Numbers of the drawing files to export

  • ifcVersion (IFC_Version) –

    IFC version

  • fileName (str) –

    Name of the IFC file

  • ifcThemeFileName (str, default: '' ) –

    Name of the theme file

ExportXPlan

ExportXPlan(
    doc: DocumentAdapter,
    fileNumbers: list[int] | VecIntList,
    xplanFilePath: str,
)

Export the data to a XPlan file

Parameters:

  • doc (DocumentAdapter) –

    Document

  • fileNumbers (list[int] | VecIntList) –

    Numbers of the drawing files to export

  • xplanFilePath (str) –

    Path and name of the XPlan file

ImportDWG

ImportDWG(
    doc: DocumentAdapter, fileName: str, configFileName: str, placePnt: Point3D
) -> BaseElementAdapterList

Import the data from a DWG file

Parameters:

  • doc (DocumentAdapter) –

    Document

  • fileName (str) –

    Name of the DWG file

  • configFileName (str) –

    Name of the DWG configuration file

  • placePnt (Point3D) –

    Placement point of the data

ImportIFC

ImportIFC(
    doc: DocumentAdapter, fileNumber: int, fileName: str
) -> BaseElementAdapterList

Import the data from an IFC file

Parameters:

  • doc (DocumentAdapter) –

    Document

  • fileNumber (int) –

    Number of the drawing file for the data import

  • fileName (str) –

    Name of the IFC file

Returns:

ImportXPlan

ImportXPlan(doc: DocumentAdapter, xplanFilePath: str, drawingFileNumber: int)

Import the data from a XPlan file

Parameters:

  • doc (DocumentAdapter) –

    Document

  • xplanFilePath (str) –

    Path and name of the XPlan file to import

  • drawingFileNumber (int) –

    Starting number of destination drawing file(s)

__init__ overloaded

__init__()

Initialize

__init__(element: ExportImportService)

Copy constructor

Parameters:

Placeholder