Solidworks Api DXF Save Problem

Hello,

I am working on a gui for save dxf the sheet metals from drawing, 

My gui can create a part ( sheet metal ) and then pass to drawing from part, after i want to save dxf file the flat pattern but when i want to save file, i get error "code:256", this mean is swFileSaveAsInvalidFileExtension

I use visual studio 2017 c#

How can i fix it?

SolidworksApi/macros