IfcDoc.CtlProperties.buttonAttributeAggregationInsert_Click C# (CSharp) Method

buttonAttributeAggregationInsert_Click() private method

private buttonAttributeAggregationInsert_Click ( object sender, EventArgs e ) : void
sender object
e EventArgs
return void
        private void buttonAttributeAggregationInsert_Click(object sender, EventArgs e)
        {
            DocAttribute docAttr = null;
            if (this.m_target is DocAttribute)
            {
                docAttr = (DocAttribute)this.m_target;
                while (docAttr != null && docAttr.AggregationAttribute != null)
                {
                    docAttr = docAttr.AggregationAttribute;
                }

                docAttr.AggregationAttribute = new DocAttribute();
            }
            else if (this.m_target is DocDefined)
            {
                docAttr = ((DocDefined)this.m_target).Aggregation;
                while (docAttr != null && docAttr.AggregationAttribute != null)
                {
                    docAttr = docAttr.AggregationAttribute;
                }

                if (docAttr != null)
                {
                    docAttr.AggregationAttribute = new DocAttribute();
                }
                else
                {
                    ((DocDefined)this.m_target).Aggregation = new DocAttribute();
                }
            }

            this.LoadAttributeCardinality();
        }
CtlProperties