laptop and a wrench

不具合

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

最後に公開された状態: August 19, 2020 ArcGIS for Desktop
不具合 ID 番号 NIM063236
送信されましたDecember 1, 2010
最終更新日February 20, 2025
適用対象ArcGIS for Desktop
見つかったバージョン10.0
プログラム言語VBA
オペレーティング システムWindows OS
オペレーティング システムのバージョン7 64 Bit
ステータスWill Not Be Addressed

参考情報

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.

対処法

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

再現の手順

不具合 ID: NIM063236

ソフトウェア:

  • ArcGIS for Desktop

バグのステータスが変更されたときに通知を受け取る

Esri Support アプリのダウンロード

このトピックについてさらに調べる

ArcGIS エキスパートのサポートを受ける

テクニカル サポートへのお問い合わせ

Esri Support アプリのダウンロード

ダウンロード オプションに移動