Export to dxf

I want to export a flattened model to dxf.

I don't want to export a part using 'ExportToDWG' of 'ExportFlatPatternView' as it takes more time to unfold and export.

Can anyone please suggest me to the api SW used(see attachment) to Export a flattened part.

SolidworksApi macros