public void ExportToDwg()
{
// get output dir to save DWGs to
System.Windows.Forms.FolderBrowserDialog dbox = new System.Windows.Forms.FolderBrowserDialog();
dbox.Description = "Folder to save exported DWG files to";
dbox.ShowNewFolderButton = true;
if (dbox.ShowDialog() == DialogResult.OK)
{
ViewSet viewsToExport = Utils.View.GetAvailableViewsToExport(m_revitApp.ActiveUIDocument.Document);
List<ElementId> views = new List<ElementId>();
foreach (Autodesk.Revit.DB.View view in viewsToExport)
{
views.Add(view.Id);
}
DWGExportOptions opts = new DWGExportOptions();
// The ACIS option has supposedly been fixed, will have to verify this with the latest code
// at a later time.
opts.ExportOfSolids = SolidGeometry.ACIS;
opts.TargetUnit = ExportUnit.Millimeter;
m_revitApp.ActiveUIDocument.Document.Export(dbox.SelectedPath, "", views, opts);
}
}