c# cad 批量将dwg转换为dxf

        private void btn_dwg2dxf_Click(object sender, EventArgs e)
        {
             Autodesk.AutoCAD.Interop.AcadApplication acadApp =
                (Autodesk.AutoCAD.Interop.AcadApplication)Autodesk.AutoCAD.ApplicationServices.Application.AcadApplication;
            foreach (var file in fileslist)
            {
                Document acDoc = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument;
                AcadDocument acadDoc = acadApp.Documents.Open(file, null, null);
                acadDoc.SaveAs(file + ".dxf", AcSaveAsType.acR15_dxf);// Autocad 2013
            }
        }

你可能感兴趣的:(C#,cad)