0

I've been working on a script to update my feature classes by grabbing new data from one feature class, and applying it to another feature class. It does this with several cursors, basically get value from the new data and set value to the old data. It works just fine on feature classes without feature-linked annotation.

However, if the feature class has feature-linked annotation it will run through the script and not save the updates or appends. Is this a known limitation, am I doing something wrong, or is there a work around to handle this?

My other post shows the layout of my code for reference.

2
  • As a guess it looks like you have a few concurrent cursors which may be locking the data. Try splitting your updates so only one cursor is used at a time. Feb 16, 2011 at 9:13
  • What license level is this script being executed under? You need ArcEditor or higher to update databases that use relationship classes as used for feature-linked annotation. Feb 18, 2011 at 4:59

1 Answer 1

1

I'm working at the ArcInfo level. I kept on playing with the code and finally got it to work. The locking issue was part of it. I'm really not sure what made it start working properly. I changed it to delete the insert and update cursors each round through instead of at the end of the script. I think because I was creating new cursor each iteration without deleting the old one was the problem. Still, the updates worked fine on features without annotation prior to doing that. Either way, I've got it working.

1
  • Updating features that participate in a relationship class will force ArcPy to do this update in an edit session. So, the difference you are seeing is most likely due to edit session locking and Python garbage collection. Feb 19, 2011 at 6:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.