Update Cursor on Annotation Feature Class

1682
2
03-15-2016 02:20 AM
DamianoMontrasio
New Contributor III

Hello,

I'm trying to edit an annotation feature class through a updateCursor.

Everything works fine as long as he writes in the field TextString worth up to 255 characters.

With a 256 or higher string I get an error "error return without exception set" that occurs at the edit.stopOperation () command.

This happens both in Pyscripter that in Python window ...

Through the interface you can create annotation texts with more than 255 characters, even if it is no longer visible in TextString field. it is as if to save him in some other field.

Any suggestion is appreciated.

Thank you

Damiano

0 Kudos
2 Replies
JoshuaBixby
MVP Esteemed Contributor

Providing a bit more information might help us help you better:

  • What Desktop product are you using?  ArcMap or ArcGIS Pro?
  • What version of the product are you using?
  • What type of cursors are you using?  There are the original/older cursors and the not-so-new-now ArcPy Data Access cursors.
  • What is your backend data store?  File geodatabase, personal geodatabase, enterprise geodatabase?  If the latter, what DBMS and version?
  • What are the properties of the field you are trying to edit?
DamianoMontrasio
New Contributor III

Joshua, Thanks for your interest ...
I solved! I am writing this update so that it can be useful to others.
I was incredulous and tried just like last hope: I increased the size from TextString range up to 10,000 characters and it worked ...

The script, which made a updatecursor on a Annotation Feature Class a FGDB, managed to put on the label text with more than 255 characters.
Fantastic!
It was the most obvious solution, but I thought that the fields of Annotation were blocked.

Damiano

0 Kudos