laptop and a wrench

Error

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

Última publicación: August 19, 2020 ArcGIS for Desktop
Número de ID del error NIM063236
EnviadoDecember 1, 2010
Última modificaciónFebruary 20, 2025
Relacionado conArcGIS for Desktop
Versión encontrada10.0
Lenguaje del programaVBA
Sistema operativoWindows OS
Versión de sistema operativo7 64 Bit
EstadoWill Not Be Addressed

Información adicional

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.

Solución alternativa

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

Pasos para reproducir

ID del error: NIM063236

Software:

  • ArcGIS for Desktop

Recibir notificaciones cuando cambie el estado de un error

Descargar la aplicación de soporte de Esri

Descubrir más sobre este tema

Obtener ayuda de expertos en ArcGIS

Contactar con el soporte técnico

Descargar la aplicación de soporte de Esri

Ir a opciones de descarga