private SelectionSet GetSelectionFromWindow() { Extents2D ex = consLine.GetExtents(); SelectionSet ss = new SelectionSet(); foreach (Drawable item in Editor.Document.ActiveView.VisibleItems) { Extents2D exItem = item.GetExtents(); if (consLine.WindowSelection && ex.Contains(exItem) || !consLine.WindowSelection && ex.IntersectsWith(exItem)) { if (Options.AllowedClasses.Count == 0 || Options.AllowedClasses.Contains(item.GetType())) { ss.Add(item); } } } return(ss); }