RevitLookup.Test.TestImportExport.ExportTo2dDwf C# (CSharp) Method

ExportTo2dDwf() public method

public ExportTo2dDwf ( ) : void
return void
        public void ExportTo2dDwf()
        {
            /// get output dir to save DWFs to
             FolderBrowserDialog dbox = new FolderBrowserDialog();
             dbox.Description = "Folder to save exported DWF files to";
             dbox.ShowNewFolderButton = true;

             try
             {
            if (dbox.ShowDialog() == DialogResult.OK)
            {

               ViewSet viewsToExport = Utils.View.GetAvailableViewsToExport(m_revitApp.ActiveUIDocument.Document);

               DWFExportOptions opts = new DWFExportOptions();
               opts.MergedViews = true;

               /// export now
               m_revitApp.ActiveUIDocument.Document.Export(dbox.SelectedPath, "", viewsToExport, opts);

               /// feedback to user
               MessageBox.Show("Done exporting to 2d Dwf!!");
            }
             }
             catch (Exception e)
             {
            MessageBox.Show(e.Message);
             }
        }