Table of Contents

CadExportJob

from OpenCAD2D import CadExportJob

class CadExportJob(System.Object) ยท CadExportJob in the .NET reference

The file EXPORT, -EXPORT, EXPORTPDF or IMPORT asks the window for (CadUiRequestEventArgs.Export), or SAVEAS shows its Save Drawing As dialog for: the title of the file dialog, the types it lists, the type and the file offered. The window shows a standard Save dialog of those types (an Open dialog where CadExportJob.Opens) and sets CadExportJob.FileName and CadExportJob.FileType to what was chosen, or CadExportJob.FileName to null where it was cancelled.

Constructors

__init__

.NET

def __init__(
    self,
    title: str,
    fileTypes: System.Collections.Generic.IReadOnlyList[str],
    fileType: str,
    fileName: str,
) -> None

Makes the file a command asks the window for.

Properties and fields

Bitmap

.NET

Bitmap: ClassVar[str]

The type Bitmap (*.bmp) of CadExportJob.ExportFileTypes, the one EXPORT writes.

Drawing

.NET

Drawing: ClassVar[str]

The one type of IMPORT's file: a DWG or a DXF drawing, brought in as a block.

Dwg

.NET

Dwg: ClassVar[str]

The DWG type of Save As of AutoCAD 2018, the one a DWG is written as where no other is chosen, listed first as AutoCAD 2021 lists it.

Pdf

.NET

Pdf: ClassVar[str]

The one type of -EXPORT's file of format Pdf.

Template

.NET

Template: ClassVar[str]

The type of Save As that writes a drawing template, a DWG with the extension .dwt, as AutoCAD 2021 lists it after the DWG types.

DwgSaveTypes

.NET

DwgSaveTypes: ClassVar[System.Collections.Generic.IReadOnlyList[str]]

Gets the DWG types of AutoCAD 2021's Save Drawing As that the DWG writer writes, the newest first, each a version DwgWriter writes: "AutoCAD 2018 Drawing (*.dwg)", then 2013/LT2013, 2010/LT2010, 2007/LT2007, 2004/LT2004 and 2000/LT2000.

DxfSaveTypes

.NET

DxfSaveTypes: ClassVar[System.Collections.Generic.IReadOnlyList[str]]

Gets the DXF types of AutoCAD 2021's Save Drawing As and of DXFOUT, the newest first, each a version DxfDatabase.Save writes: "AutoCAD 2018 DXF (*.dxf)" down to "AutoCAD R12/LT2 DXF (*.dxf)".

ExportFileTypes

.NET

ExportFileTypes: ClassVar[System.Collections.Generic.IReadOnlyList[str]]

Gets the types of AutoCAD 2021's Export Data dialog, as its help lists them for EXPORT: 3D DWF, 3D DWFx, ACIS, Bitmap, Block, DXX Extract, Encapsulated PS, IGES, Lithography, Metafile, V7 DGN and V8 DGN. Of these the presenter writes Bitmap, Block (as WBLOCK), DXX Extract (as ATTEXT), Encapsulated PS (as PSOUT) and Metafile (as WMFOUT); Lithography asks for solids, which a 2D drawing has none of, as STLOUT does; EXPORT refuses the others.

FileName

.NET

@property
def FileName(self) -> str | None
@FileName.setter
def FileName(self, value: str | None) -> None

Gets or sets the file: the one offered until the window sets the one its dialog chose, or null where it was cancelled.

FileType

.NET

@property
def FileType(self) -> str
@FileType.setter
def FileType(self, value: str | None) -> None

Gets or sets the type chosen: the one offered until the window sets the one its dialog chose.

FileTypes

.NET

@property
def FileTypes(self) -> System.Collections.Generic.IReadOnlyList[str]

Gets the types the dialog lists, each as "Bitmap (*.bmp)".

Opens

.NET

@property
def Opens(self) -> bool
@Opens.setter
def Opens(self, value: bool) -> None

Gets or sets whether the dialog asks for a file to read, as IMPORT's Import File does, the window showing an Open dialog that takes only a file that exists; false, as it starts, it is a Save dialog.

PdfOptions

.NET

@property
def PdfOptions(self) -> CadExportPdfOptions | None

Gets what EXPORTPDF's Save As PDF dialog sets beside the file (Output Controls, Export, Page Setup, Options); null for any other file. A window that shows only a file dialog leaves it as made.

Title

.NET

@property
def Title(self) -> str

Gets the title of the dialog.

Methods

DwgTypeOfVersion

.NET

@staticmethod
def DwgTypeOfVersion(version: str) -> str

Gets the DWG type of Save As that writes a version, as AutoCAD 2021 lists it: "AutoCAD 2013/LT2013 Drawing (*.dwg)" for AC1027.

DwgVersionOfType

.NET

@staticmethod
def DwgVersionOfType(fileType: str) -> str

Gets the version a DWG type of Save As writes: AC1024 for "AutoCAD 2010/LT2010 Drawing (*.dwg)".

DxfTypeOfVersion

.NET

@staticmethod
def DxfTypeOfVersion(version: str) -> str

Gets the DXF type of Save As that writes a version, as AutoCAD 2021 lists it: "AutoCAD 2018 DXF (*.dxf)" for AC1032.

DxfVersionOfType

.NET

@staticmethod
def DxfVersionOfType(fileType: str) -> str

Gets the version a DXF type of Save As writes: AC1024 for "AutoCAD 2010/LT2010 DXF (*.dxf)".

ExtensionsOf

.NET

@staticmethod
def ExtensionsOf(fileType: str) -> System.Collections.Generic.IReadOnlyList[str]

The extensions of a type, with their dots, as listed in its brackets: .iges and .igs of "IGES (*.iges;*.igs)".