DwgStatsBatch() { // get multiple files to batch process Autodesk.AutoCAD.Windows.OpenFileDialog dwgsForm = new Autodesk.AutoCAD.Windows.OpenFileDialog("Drawing Files To Process", null, "dwg", "DwgStatsBatch", Autodesk.AutoCAD.Windows.OpenFileDialog.OpenFileDialogFlags.AllowMultiple); if (dwgsForm.ShowDialog() != DialogResult.OK) { return; } // get output file to save XML report to System.Windows.Forms.SaveFileDialog dbox = new System.Windows.Forms.SaveFileDialog(); dbox.CreatePrompt = false; dbox.OverwritePrompt = true; dbox.AddExtension = true; dbox.DefaultExt = "xml"; dbox.Filter = "XML Files (*.xml)|*.xml"; dbox.Title = "XML file to save report as"; if (dbox.ShowDialog() == DialogResult.OK) { DwgStats.Report statReport = new DwgStats.Report(); statReport.XmlReport(dbox.FileName, dwgsForm.GetFilenames()); } }
DwgStats() { // get output file to save XML report to System.Windows.Forms.SaveFileDialog dbox = new System.Windows.Forms.SaveFileDialog(); dbox.CreatePrompt = false; dbox.OverwritePrompt = true; dbox.AddExtension = true; dbox.DefaultExt = "xml"; dbox.Filter = "XML Files (*.xml)|*.xml"; dbox.Title = "XML file to save report as"; if (dbox.ShowDialog() == DialogResult.OK) { DwgStats.Report statReport = new DwgStats.Report(); statReport.XmlReport(dbox.FileName, Utils.Db.GetCurDwg()); } }