Some pieces of annotation are not observing angle when viewed in ArcMap.
上次发布: August 25, 2014No Product Found
漏洞 ID 编号
NIM005363
已提交
December 1, 2006
上次修改时间
June 5, 2024
适用范围
No Product Found
找到的版本
9.2
状态
Known Limit
经开发团队审核,已确定此问题与不受 Esri 控制的软件的已知限制有关。 问题的“其他信息”部分可能包含进一步说明。
附加信息
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