コード例 #1
0
        private void createNewDesignOptions()
        {
            string       mesStr = "There are no existing design options, do you want to create?";
            DialogResult result = MessageBox.Show(mesStr, "Create New Design Options", MessageBoxButtons.YesNo);

            if (result == System.Windows.Forms.DialogResult.Yes)
            {
                allowToCreate = true;
                RevitCommandId commandId = RevitCommandId.LookupPostableCommandId(PostableCommand.DesignOptions);
                uiapp.PostCommand(commandId);
            }
            else
            {
                allowToCreate = false;
                uiapp.Idling -= Application_Idling;
            }
        }