laptop and a wrench

漏洞

Some pieces of annotation are not observing angle when viewed in ArcMap.

上次发布: August 25, 2014 No Product Found
漏洞 ID 编号 NIM005363
已提交December 1, 2006
上次修改时间June 5, 2024
适用范围No Product Found
找到的版本9.2
状态Known Limit

附加信息

No Public Explanation

解决办法

This annotation contains elements with two point lines where the points are nearly identical. When they are finally snapped to the spatial reference in 9.2, the lines end up being zero leght because the points snap together. We could detect this at drawtime, but it would incur a significant performance hit for a data case that is not valid in the first place. These features should be converted to one-point annotation to resolve the problem. To do this, run the following code on a selection set of all the features in the annotation feature class while in an edit session. Save edits when done. Public Sub ConvertZeroLengthTwoPointAnnotationToOnePointAnnotation() Dim pApp As IApplication Dim pEditor As IEditor Dim pMxDoc As IMxDocument Dim pEnumFeature As IEnumFeature Dim pAnnoFeat As IAnnotationFeature Dim pElement As IElement Dim pPolyline As IPolyline Dim pFeature As IFeature Dim pGeometry As IGeometry Dim Count As Integer Dim pID As New UID Dim pPointCollection As IPointCollection pID = "esriEditor.Editor" Set pApp = Application Set pMxDoc = pApp.Document Set pEditor = pApp.FindExtensionByCLSID(pID) If pEditor.EditState = esriStateNotEditing Then MsgBox "Please start an edit session and select annotation features." Exit Sub End If Set pEnumFeature = pEditor.EditSelection pEnumFeature.Reset pEditor.StartOperation Set pFeature = pEnumFeature.Next For Count = 0 To pEditor.SelectionCount - 1 If TypeOf pFeature Is IAnnotationFeature Then Set pAnnoFeat = pFeature Set pElement = pAnnoFeat.Annotation If TypeOf pElement Is ITextElement Then Set pGeometry = pElement.Geometry If TypeOf pGeometry Is IPolyline Then Set pPointCollection = pGeometry If pPointCollection.PointCount = 2 Then If pPointCollection.Point(0).X = pPointCollection.Point(1).X And _ pPointCollection.Point(0).Y = pPointCollection.Point(1).Y Then pElement.Geometry = pPointCollection.Point(0) pAnnoFeat.Annotation = pElement pFeature.Store Debug.Print "Updated Feature: " & pFeature.OID End If End If End If End If End If Set pFeature = pEnumFeature.Next Next Count pEditor.StopOperation ("Update text with two point baselines that have 0 length") Dim pActiveView As IActiveView Set pActiveView = pMxDoc.ActiveView pActiveView.PartialRefresh esriViewGeography, Nothing, pActiveView.extentEnd Sub

重现步骤

漏洞 ID: NIM005363

软件:

  • No Product Found

当漏洞状态发生变化时获得通知

下载 Esri 支持应用程序

发现关于本主题的更多内容

获取来自 ArcGIS 专家的帮助

联系技术支持部门

下载 Esri 支持应用程序

转至下载选项