This UserControl is used to collect the information for sketch plane creation
示例#1
0
        /// <summary>
        /// When click the createSketchPlaneButton, create a new sketch plane in revit
        /// </summary>
        private void createSketchPlaneButton_Click(object sender, EventArgs e)
        {
            // Display a form to collect some necessary data
            using (SketchPlaneForm displayForm = new SketchPlaneForm(m_dataBuffer))
            {
                displayForm.ShowDialog();
            }

            // Rebind the data source of the sketchPlaneComboBox to refresh data
            BindComboBox(sketchPlaneComboBox, m_dataBuffer.SketchPlaneIDArray);
            // Set the selected Item to be the new created one
            sketchPlaneComboBox.SelectedIndex = sketchPlaneComboBox.Items.Count - 1;

            // Refresh the form display.
            this.Refresh();
        }
示例#2
0
        /// <summary>
        /// When click the createSketchPlaneButton, create a new sketch plane in revit
        /// </summary>
        private void createSketchPlaneButton_Click(object sender, EventArgs e)
        {
            // Display a form to collect some necessary data
            using (SketchPlaneForm displayForm = new SketchPlaneForm(m_dataBuffer))
            {
                displayForm.ShowDialog();
            }

            // Rebind the data source of the sketchPlaneComboBox to refresh data
            BindComboBox(sketchPlaneComboBox, m_dataBuffer.SketchPlaneIDArray);
            // Set the selected Item to be the new created one
            sketchPlaneComboBox.SelectedIndex = sketchPlaneComboBox.Items.Count - 1;

            // Refresh the form display.
            this.Refresh();
        }