Delete Feature linked annotation -> Shape or row not found

1026
1
01-25-2011 09:32 AM
Marc-OlivierEthier
New Contributor II
How to avoid "Shape or row not found" when deleting a SDE feature linked annotation ?

I add a polygon feature with a insert cursor. Then, I delete it's feature linked annotation with the annotation feature delete method.

Thanks
0 Kudos
1 Reply
Marc-OlivierEthier
New Contributor II
Hi, for those with the same error, I found how to avoid the Shape or Row not found by using  AutoCreate method of IAnnoClassAdmin3 class. I set it to false, add polygons then set it back to true. This way, I don't need to delete the feature linked annotation because it is not created...

        ' Disable annotation AutoCreate
        Dim pACAdmin As IAnnoClassAdmin3
        pACAdmin = CType(MyFeatureClass.Extension, IAnnoClassAdmin3)
        pACAdmin.AutoCreate = False

        [...] : Code that create polygon

        pACAdmin.AutoCreate = True
0 Kudos