IGraphicsContainerSelect::SelectElement method does not highlight the selection of the IFDOGraphicsLayer.
上次发布: August 25, 2014No Product Found
漏洞 ID 编号
NIM013321
已提交
November 29, 2007
上次修改时间
June 5, 2024
适用范围
No Product Found
找到的版本
9.2
编程语言
VBA
状态
Will Not Be Addressed
开发团队已考虑过该问题或请求,并决定不会解决该问题。 问题的“其他信息”部分可能包含进一步说明。
附加信息
No Public Explanation
解决办法
Public Sub SelectGeoDBAnnoByEnvelopeObjectID()Dim pMxDoc As IMxDocumentSet pMxDoc = ThisDocumentDim pMap As IMapSet pMap = pMxDoc.FocusMapDim pFDOGraphicsLayer As IFDOGraphicsLayerSet pFDOGraphicsLayer = pMap.Layer(0)Dim pCmdItem As ICommandItem'Use ArcID module and the Name of the start edit commandSet pCmdItem = Application.Document.CommandBars.Find(arcid.Editor_StartEditing)pCmdItem.ExecuteSet pMap.ActiveGraphicsLayer = pFDOGraphicsLayerDim pGC As IGraphicsContainerSet pGC = pMap.ActiveGraphicsLayerDim pGCSelect As IGraphicsContainerSelectSet pGCSelect = pGCDim pEnumElement As IEnumElementSet pEnumElement = pGC.LocateElementsByEnvelope(pMxDoc.ActiveView.FullExtent)pEnumElement.ResetDim pAnnoElement As IAnnotationElementSet pAnnoElement = pEnumElement.NextDo While Not pAnnoElement Is Nothing Dim pFeature As IFeature Set pFeature = pAnnoElement.Feature If pFeature.OID = "373" Then pGCSelect.SelectElement pAnnoElement End If Set pAnnoElement = pEnumElement.NextLooppMxDoc.ActiveView.RefreshEnd Sub