Commit() public method

Submit RebarShapeDefinition. All the parameters and constraints will be added to RebarShape. The RebarShape will be added to Revit document after successfully submitted.
public Commit ( System.Windows.Forms.Document rvtDoc, DefinitionGroup defGroup ) : void
rvtDoc System.Windows.Forms.Document
defGroup DefinitionGroup Parameter definition group
return void
Esempio n. 1
0
        /// <summary>
        /// OK Button, commit the RebarShapeDef, if there are not any exception,
        /// The RebarShape will be added to Revit Document successfully.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void okButton_Click(object sender, EventArgs e)
        {
            try
            {
                m_rebarShapeDef.Commit(m_rvtDoc, GetOrCreateDefinitionGroup());
            }
            catch (Exception ex)
            {
                MessageBox.Show("Rebar shape creation failed:" + ex.ToString());
                return;
            }

            DialogResult = DialogResult.OK;
            Close();
        }