Provides access to members that control graphic container selection.
Most objects which are considered graphics containers, the PageLayout and Map objects for example, implement the IGraphicsContainerSelect interface to expose additional members for managing their element selection. For example, use IGraphicsContainerSelect::UnselectAllElements to clear an object's graphic element selection.
The following simple VBA example returns the number of elements currently selected in the focus Map and the PageLayout.
Public Sub GraphicSelectionCount()
Dim pMxDocument As IMxDocument
Dim pMap As IMap
Dim pPageLayout As IPageLayout
Dim pMapGraphicsSelect As IGraphicsContainerSelect
Dim pPageLayoutGraphicsSelect As IGraphicsContainerSelect
Set pMxDocument = Application.Document
Set pMap = pMxDocument.FocusMap
Set pPageLayout = pMxDocument.PageLayout
Set pMapGraphicsSelect = pMap
Set pPageLayoutGraphicsSelect = pPageLayout
MsgBox pMapGraphicsSelect.ElementSelectionCount
MsgBox pPageLayoutGraphicsSelect.ElementSelectionCount
End Sub
| Description | ||
|---|---|---|
![]() |
DominantElement | Dominant element. |
![]() |
ElementSelected | Indicates if the element is selected. |
![]() |
ElementSelectionCount | The number of selected elements. |
![]() |
SelectAllElements | Selects all elements. |
![]() |
SelectedElement | Returns the nth selected element. Use Selection count to get the number of selected elements. |
![]() |
SelectedElements | The selected elements. |
![]() |
SelectElement | Selects the specified element. |
![]() |
SelectElements | Selects the specified elements. |
![]() |
SelectionBounds | The bounds of the selection. |
![]() |
SelectionTracker | Returns the tracker for the nth selected element. Use Selection count to get the number of selected elements. |
![]() |
UnselectAllElements | Unselects all elements. |
![]() |
UnselectElement | Unselects the specified element. |
![]() |
UnselectElements | Unselects the specified elements. |
| CoClasses and Classes | Description |
|---|---|
| CompositeGraphicsLayer | A collection of graphics layers that behave like single layer. |
| FDOGraphicsLayer | A FDO graphics layer. |
| Map | A container for the display and manipulation of map data. |
| PageLayout | Page Layout. |
IGraphicsContainer Interface | IEnumElement Interface | IGraphicsContainerSelect Interface | IActiveView.Selection Property