MKI_DWGDXF_EXPORT (Import and Export Classes) New in Version 2026.0

www.CAD6.com

C++ Syntax

class MKI_DWGDXF_EXPORT

{

  public:

 

  MKI_FILENAMEW m_szFileName;

 

  __int32 m_nExportContext,

          m_nOptions,

          m_nPageExportMode,

          m_nPageExportSelItemNum,

          m_nPageExportTotalItemNumSaved,

          m_nDecimalPlaces,

          m_nTransmissionMode,

          m_nPostProcessingFormat,

          m_n3DMode;

 

  double m_dExportScalingFactor,

         m_dFontScale;

  MKI_VECTOR m_cOffset;

 

  bool m_fApplyTextFormat, 

       m_fExportRGBColor,

       m_fExportConstructionAid,

       m_fDrawViewportsLast,

       m_fExplodeBlocks,

       m_fUseScreenProperties,

       m_fCopyBitmapFiles,

       m_fCreate7ZArchive,

       m_fShowProtocolWindow;

 

  MKI_STR2048W m_szCommandLine;

  MKI_BITFIELD<MKI_PAGE_MAX> m_cPageExportSelection;

 

  MKI_DWGDXF_EXPORT( void );

 

  void

  Init( void );

};

 

This structure contains information for a DWG / DXF export. Please refer to the help text of the corresponding CAD6 command for more details.

 

Element Description

m_nExportContext

[__int32] Defines the use-case for this structure. These use-cases may differ in available number and allowed combination of options, especially regarding layout mode and pages.

MKI_EXPORTCONTEXT_SAVE

Use-case "Save complete drawing".

MKI_EXPORTCONTEXT_EXPORT

Use-case "Export partial drawing".

m_nOptions

[__int32] Bit-wise OR combination of the following flags (some flags are mutually exclusive).

OPTION_DEFAULT

Default export mode.

OPTION_CREATE_UCS

If specified a user coordinate system is created for the model space.

This flag may only be specified if m_nExportActiveWhenEditing is set to zero.

OPTION_INTERNAL_ORIGIN

If specified all coordinates of model space objects are saved relative to the internal origin.
This flag may only be specified if m_nExportActiveWhenEditing is set to zero.

OPTION_MINCOORD_IS_ORIGIN

If specified the bottom left corner of the encompassing frame of all objects selected for export - i.e. their minimum X/Y coordinate - is used as the zero point.
This flag may only be specified if m_nExportActiveWhenEditing is set to non-zero.

OPTION_ADAPT_PAGE_FRAME

If specified the encompassing frame of all page objects selected for export is used as the page frame (ignored if model space objects are selected).
This flag may only be specified if m_nExportActiveWhenEditing is set to non-zero. An optional offset (m_cOffset) enlarges the page frame accordingly.

OPTION_RESOLVED_POLYLINE

No objects of type LWPOLYLINE or POLYLINE are created. Instead, each of these objects are resolved into basic objects, like for example LINE or ARC.

OPTION_PLAIN_TEXT

Text objects are exported as contours and not as regular text objects (TEXT or MTEXT).

m_nPageExportMode

[__int32] Contains one of the following page modes. Not applicable if m_nExportActiveWhenEditing is set to non-zero.

PAGEMODE_ALL

All pages of the drawing are exported. Model space objects are always output.

PAGEMODE_CURRENT

Only the current page of the drawing is exported. Model space objects are always output.

PAGEMODE_SELECTION

A specific selection of pages of the drawing is exported (refer to m_cPageExportSelection). Model space objects are always output.

PAGEMODE_MODEL_ONLY

Only model space objects are output.

m_nPageExportSelItemNum

[__int32] Number of pages to be exported. Not applicable if m_nExportActiveWhenEditing is set to non-zero.

m_nPageExportTotalItemNumSaved

[__int32] Number of pages saved in m_cPageExportSelection. Not applicable if m_nExportActiveWhenEditing is set to non-zero.

m_nDecimalPlaces

[__int32] Number of places after the decimal separator each floating point number is rounded to during export. Values from 0 to 14 are allowed.

m_nTransmissionMode

[__int32] Determines how properties, e.g. line color or line pattern, are transmitted from layers or block instances to objects. Contains one of the following values.

TRANSMIT_AUTOMATIC

The transmission mode of objects is determined automatically (recommended).

TRANSMIT_BYLAYER

Use transmission mode BYLAYER.

TRANSMIT_BYBLOCK

Use transmission mode BYBLOCK.

m_nPostProcessingFormat

[__int32] Contains one of the following post-processing modes.

CONVMODE_DEFAULT

The target format is AC1024 (recommended).

CONVMODE_CMDLINE

The specified command line options are used for the export.

CONVMODE_ALTERNATIVE

The target format is AC1032.

m_n3DMode

[__int32] Contains one of the following 3D processing modes.

MODE_3D_MAINTAIN

3D components are exported as 3D surface models (a shell made of triangles).

MODE_3D_TO_2D

3D components are exploded into 2D surfaces before export.

m_dExportScalingFactor

[double] Factor used to scale all objects before export.

m_dFontScale

[double] Horizontal scaling that is applied to all texts before export.

m_cOffset

[MKI_VECTOR] This offset is applied to the page frame if OPTION_ADAPT_PAGE_FRAME is specified.

m_fApplyTextFormat

[bool] For optimal display the object's text parameters (e.g. line spacing, alignment and formatting) are applied to each text object before export. So for each line of text at least one object of type TEXT is created (recommended). Otherwise, objects of type MTEXT with multi-line texts are created. In this case not all text alignment and formatting options are supported.

m_fExportRGBColor

[bool] 24-bit RGB color values are exported. Otherwise only an index for the ACI color table (contains only 256 colors) is exported.

m_fExportConstructionAid

[bool] Construction aid objects are exported.

m_fDrawViewportsLast

[bool] Mappings (viewports) are drawn in the foreground, i.e. there are drawn last.

m_fExplodeBlocks

[bool] All blocks, groups, and drawing references are resolved before export.

m_fUseScreenProperties

[bool] The objects' screen properties are used for export.

m_fCopyBitmapFiles

[bool] All bitmap files relevant for the export are copied to the destination directory.

m_fCreate7ZArchive

[bool] A 7z archive containing all necessary files, the exported DWG / DXF file and all possibly copied bitmap files, is created in the destination directory.

m_fShowProtocolWindow

[bool] Display the protocol window after post-processing.

m_szCommandLine

[MKI_STR20248W] String containing the command line options used for the export (empty string if there are no command line options).

m_cPageExportSelection

[MKI_BITFIELD<MKI_PAGE_MAX>] Bit field containg a specific selection of pages of the drawing to be exported (depends on m_nPageExportMode).

 

CAD6interface 2026.0 - Copyright 2026 Malz++Kassner® GmbH