private void checkBox_CheckedChanged(object sender, EventArgs e) { bool check = checkBoxPorog.Checked; ListBoxDWTypes.BeginUpdate(); //List<FamilySymbol> elemTypes = ListBoxDWTypes.Items as List<FamilySymbol>; foreach (Element elem in ListBoxDWTypes.Items) { bool param = System.Convert.ToBoolean(elem.LookupParameter("Порог").AsInteger()); if (param != check) { ListBoxDWTypes. } } }
private void FormGeneratingTypes_Load(object sender, EventArgs e) { List <ElementId> elemTypesIds = _elem.GetValidTypes().ToList(); List <FamilySymbol> elemTypes = new List <FamilySymbol>(); foreach (ElementId typeId in elemTypesIds) { elemTypes.Add(_doc.GetElement(typeId) as FamilySymbol); } ListBoxDWTypes.BeginUpdate(); foreach (FamilySymbol elem in elemTypes) { ListBoxDWTypes.Items.Add(elem); } ListBoxDWTypes.EndUpdate(); }