IfcDoc.FormEdit.DeleteReferencesForAttribute C# (CSharp) 메소드

DeleteReferencesForAttribute() 개인적인 메소드

Scans all data definitions and deletes any dependencies on the specified attribute.
private DeleteReferencesForAttribute ( string definition, string attribute ) : void
definition string Required name of entity
attribute string Required name of attribute
리턴 void
        private void DeleteReferencesForAttribute(string definition, string attribute)
        {
            foreach (DocSection docSection in this.m_project.Sections)
            {
                foreach (DocSchema docSchema in docSection.Schemas)
                {
                    foreach (DocEntity docEntity in docSchema.Entities)
                    {
                        for (int iAttr = docEntity.Attributes.Count - 1; iAttr >= 0; iAttr--)
                        {
                            DocAttribute docAttr = docEntity.Attributes[iAttr];
                            if (docAttr.Inverse == attribute && docAttr.DefinedType == definition)
                            {
                                docAttr.Delete();
                                docEntity.Attributes.RemoveAt(iAttr);
                            }
                        }
                    }
                }
            }

            this.UpdateTreeDeletion();
        }
FormEdit