/// <summary> /// Проверка является ли элемент SPDS-элементом /// </summary> public static bool IsSPDSElement(this Element element) { CellHeaderElement cell = element as CellHeaderElement; if (cell == null) { return(false); } var manager = DgnECManager.Manager; using (DgnECInstanceCollection ecInstances = manager.GetElementProperties(cell, ECQueryProcessFlags.SearchAllClasses)) { return(ecInstances.FirstOrDefault(x => x.ClassDefinition.Name == ECCLASS_COMMON_NAME && x.ClassDefinition.Schema.Name == SCHEMA_NAME) != null); } }
private ECPropertyReader(Element element, string className) { if (element == null) { throw new ArgumentNullException("element"); } // !проверка, что элемент добавлен в модель if (element.DgnModel == null || element.ElementId == null) { throw new ArgumentException(string.Format( "Couldn't read EC-properties from non-model element")); } this.element = element; using (DgnECInstanceCollection ecInstances = DgnECManager.Manager. GetElementProperties(element, ECQueryProcessFlags.SearchAllClasses)) { ecInst = ecInstances.FirstOrDefault(x => x.ClassDefinition.Name == className); // EnumString.ToString(instType)); } }