laptop and a wrench

Bug

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

Last Published: August 25, 2014 No Product Found
Bug ID Number NIM005363
SubmittedDecember 1, 2006
Last ModifiedJune 5, 2024
Applies toNo Product Found
Version found9.2
StatusKnown Limit

Additional Information

No Public Explanation

Workaround

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

Steps to Reproduce

Bug ID: NIM005363

Software:

  • No Product Found

Get notified when the status of a bug changes

Download the Esri Support App

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options