3D Step to DXF with flatpattern c#

Hi,

i have a 3d step file (iron sheet, see picture). I want to do the flatpattern, so i get the result like in the next picture (2d dxf). I solved the problem in solidworks gui, but i want to do it automatically in a C# Programm. I recorded a makro, but this don't work. I found a ExportFlatPattern function, but i dont get a suitable result.

Can anybody help me?

SolidworksApi macros