Creates a new selection set.
Optional initial array of entity IDs to include in the selection
Readonly
eventsEvents fired when selection changes
Fired when entities are added to the selection
Fired when entities are removed from the selection
Gets the number of selected entities.
The count of selected entities
Gets an array of all selected entity IDs.
Array containing all selected entity IDs
Adds one or more entities to the selection.
Fires a selectionAdded
event with the added entity IDs.
Duplicate IDs are automatically handled by the internal Set.
Single entity ID or array of entity IDs to add
Removes one or more entities from the selection.
Fires a selectionRemoved
event with the removed entity IDs.
Non-existent IDs are silently ignored.
Single entity ID or array of entity IDs to remove
Manages a collection of selected CAD entities in the current view.
This class maintains a set of selected entity IDs and provides methods to:
The selection set fires events when entities are added or removed, allowing other components (like the view) to respond to selection changes by showing grip points, updating UI, etc.
Example