FlatPatternExport problem

Hello to all,

I'm writing an API with some functions and shortcuts to helpproductivity in my company.
One of the items in the TODO list is a shortcut for the SaveAs DXF.
Right now I've managed to test the ExportFlatpatternView, but whenI try to save with ModelDocExtension.SaveAs, I always get the sameerror... #256.

Can anyone help me?
When I read the documentation and the examples in VB, it looks likethe PartDoc class has a "Extension" method, but I can't find it.

Thanks for your help.SolidworksSheet Metal