Exemple #1
0
        private IEnumerable <ObjectId> GetAllCurveObjectIds()
        {
            if (_actionsSettingViewModel == null)
            {
                // Get all entity ids of database.
                var allIds = LayerUtils.GetObjectIdcollectionFromLayerNames(Document.Database, "*");
                return(allIds);
            }

            if (_actionsSettingViewModel.EntitySelectVM.IsSelectAll)
            {
                var allSelectedIds = LayerUtils.GetObjectIdcollectionFromLayerNames(Document.Database,
                                                                                    _actionsSettingViewModel.EntitySelectVM.LayersText).ToList();

                var fixedIds = _actionsSettingViewModel.EntitySelectVM.FixedObjectIds;

                // Remove the fixed items from all entities.
                foreach (ObjectId fixedId in fixedIds)
                {
                    if (allSelectedIds.Contains(fixedId))
                    {
                        allSelectedIds.Remove(fixedId);
                    }
                }

                return(allSelectedIds);
            }

            return(_actionsSettingViewModel.EntitySelectVM.SelectedObjectIds);
        }