コード例 #1
0
        public FrmJournaling(Journaling dataBuffer)
        {
            InitializeComponent();

            m_dataBuffer = dataBuffer;

            cmbType.DataSource     = m_dataBuffer.WallTypes;
            cmbType.DisplayMember  = "Name";
            cmbLevel.DataSource    = m_dataBuffer.Levels;
            cmbLevel.DisplayMember = "Name";
        }
コード例 #2
0
        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);
            }
        }