ExportEx .DXF (COM c++)

Hello! This is the working VBA code to export the selected range of shapes in dxf format. In the filter, I specify the export options I need. I don't understand why the filter is configured after the "ExportEx" export command is executed. But it works.


Dim expopt As StructExportOptions

Dim expflt As ExportFilter

Set expopt = CreateStructExportOptions

expopt.UseColorProfile = True

Set expflt = ActiveDocument.ExportEx("path", cdrDXF, cdrSelection, expopt)

With expflt
      .BitmapType = 0: .TextAsCurves = False: .Version = 13: .Units = 3: .FillUnmapped = True: .FillColor = 0: .Finish
End With


I'm trying to do the same thing via COM (c++). And I don't know how to adjust the filter.


VGCore::ICorelExportFilterPtr filter = doc-> ExportEx(_bstr_t ("path"), cdrDXF, cdrSelection, nullptr, nullptr); //here doc - VGCore::IVGDocumentPtr


In this case, the export is done with incorrect settings (for example, the units are cm instead of mm). And I don't see available settings in filter properties and methods as in VBA (.Unit, etc.). How to write code similar to VBA in C++.