-1

Am using Microsoft.Office.Interop.Visio to create a visio file. It's working as expected. Now the new requirement is to save the file as DWG and DXF.

I saw Page.Export Method to export the visio file to different file type. But using export method it's not generating the DWG and DXF other than that everything is generating.

Microsoft.Office.Interop.Visio.Document doc = VisioApplication.Documents.OpenEx( sFileToWrite, stick );
int iCount = doc.Pages.Count;
for( int i = 0; i < iCount - 1; i++ )
                     {
    Microsoft.Office.Interop.Visio.Page page = doc.Pages.get_ItemFromID( i + 1 );
    page.Export("E:\\thejus" + i + ".dwg" ); //not working
    page.Export("E:\\thejus" + i + ".bmp" ); //working
 }

Please let me know if someone knows the reason

thejustv
  • 1,891
  • 21
  • 41

2 Answers2

0

everything is correct. My visio license was expired because of that the file was not creating.

thejustv
  • 1,891
  • 21
  • 41
0
Visio.Document Document=App.Documents.OpenEx("D:\\Temp\\trees_top_with_shadow.dwg", Flags);
int iCount = Document.Pages.Count;
for (int i = 0; i < iCount; i++)
{
    Microsoft.Office.Interop.Visio.Page page = Document.Pages.get_ItemFromID(i);                    
    page.Export("D:\\temp\\thejus" + i + ".svg"); //working
    page.Export("D:\\temp\\thejus" + i + ".bmp"); //working
}
Sunil
  • 3,279
  • 10
  • 19
  • 27