Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions src/RevitRoundingOfAreas/ViewModels/MainViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -133,15 +133,17 @@ private IEnumerable<ParamViewModel> GetSourceParamViewModels() {

// Метод получения коллекции ParamViewModel для TargetParams
private IEnumerable<ParamViewModel> GetTargetParamViewModels() {
var spatialElements = _revitRepository.GetAllSpatialElements().ToList();

return _paramService.AllRevitParams
.Where(revitParam => {
var spatialElements = _revitRepository.GetAllSpatialElements();
var randomSpatialElement = spatialElements.FirstOrDefault();
if(randomSpatialElement is null) {
return false;
}
var param = revitParam.GetParam(randomSpatialElement);
return !param.IsReadOnly;
if (!spatialElements.Any())
return true;

return spatialElements.All(spatialElement => {
var param = revitParam.GetParam(spatialElement);
Comment thread
KozlovPS marked this conversation as resolved.
Outdated
return param != null && !param.IsReadOnly;
});
})
.Select(param => new ParamViewModel {
Name = param.Name,
Expand Down
Loading