public Form_AreaMass(UIApplication uiapp, List <Element> areas) { try { m_app = uiapp; doc = m_app.ActiveUIDocument.Document; collectedAreas = areas; InitializeComponent(); this.Text = "Create Extruded Mass - v" + System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString(); //to restore user setting for shared parameter file originalDefFile = m_app.Application.SharedParametersFilename; iniDataManager = new INIDataManager(m_app, MassCategory.Areas); placedAreas = iniDataManager.PlacedAreas; areaDiscrepancy = iniDataManager.AreaDiscrepancy; defDictionary = iniDataManager.DefDictionary; CollectAreas(); DisplayAreaData(); massCreator = new MassCreator(m_app); massCreator.AreaDictionary = areaDictionary; massCreator.MassFolder = iniDataManager.MassFolder; } catch (Exception ex) { MessageBox.Show("Failed to start running the Mass Tool.\n" + ex.Message, "Mass From Area", MessageBoxButtons.OK, MessageBoxIcon.Warning); } }