1. Choose the selection mode in the options tool bar.
2. Use the mouse to pick one entity of the contour you want to select. The tool then searches from the endpoints of the selected entity in both directions for entities that are directly or indirectly connected to this entity. All connected entities are selected or deselected depending on the chosen selection mode.

Instead of using this tool, you can simply double-click an entity to select it and all connected entities.