laptop and a wrench

Bug

IGraphicsContainerSelect::ElementSelectionCount property returns the count of all selected graphic elements in all layers.

Zuletzt veröffentlicht: August 19, 2020 ArcGIS for Desktop
Bug-ID-Nummer NIM063236
EingereichtDecember 1, 2010
Zuletzt geändertFebruary 20, 2025
Gilt fürArcGIS for Desktop
Gefunden in Version10.0
ProgrammspracheVBA
BetriebssystemWindows OS
Betriebssystemversion7 64 Bit
StatusWill Not Be Addressed

Zusätzliche Informationen

We apologize that we were unable to address this issue within the current product support cycle.  If the issue continues to affect your work in a supported release, please contact Technical Support.

Workaround

Cast ActiveGraphicsLayer to IGraphicsContainer and loop through the elements to validate if they are selected or not.Sub SelectionCount() Dim pMxDocument As IMxDocument Set pMxDocument = ThisDocument Dim gc As IGraphicsContainer Set gc = pMxDocument.FocusMap.ActiveGraphicsLayer Dim pGraphicsContainerSelect As IGraphicsContainerSelect Set pGraphicsContainerSelect = gc gc.Reset Dim elem As IElement Set elem = gc.Next() Dim x As Integer x = 0 Do While Not elem Is Nothing If (pGraphicsContainerSelect.ElementSelected(elem) = True) Then x = x + 1 End If Set elem = gc.Next() Loop MsgBox pMxDocument.FocusMap.ActiveGraphicsLayer.Name & " is selected" & x & " elements" pMxDocument.ActiveView.RefreshEnd Sub

Schritte zur Reproduzierung

Bug-ID: NIM063236

Software:

  • ArcGIS for Desktop

Benachrichtigung erhalten, wenn sich der Status eines Bugs ändert

Esri Support App herunterladen

Weitere Informationen zu diesem Thema erkunden

Unterstützung durch ArcGIS-Experten anfordern

An den technischen Support wenden

Esri Support App herunterladen

Zu Download-Optionen wechseln