public FrmJournaling(Journaling dataBuffer) { InitializeComponent(); m_dataBuffer = dataBuffer; cmbType.DataSource = m_dataBuffer.WallTypes; cmbType.DisplayMember = "Name"; cmbLevel.DataSource = m_dataBuffer.Levels; cmbLevel.DisplayMember = "Name"; }
public RevitUI.Result Execute(RevitUI.ExternalCommandData commandData, ref string message, RevitDB.ElementSet elements) { try { RevitDB.Transaction tran = new RevitDB.Transaction(commandData.Application.ActiveUIDocument.Document, "Journaling"); tran.Start(); Journaling deal = new Journaling(commandData); deal.Run(); tran.Commit(); return(RevitUI.Result.Succeeded); } catch (Exception ex) { message = ex.Message; return(RevitUI.Result.Failed); } }