Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Let's say I have an annotation feature class with three annotation classes--anno1, anno2, and anno3--and I want to have anno1 on top, anno2 in the middle, and anno3 on the bottom. Can I and where do I set this zorder? Also, assuming zorder index starts at 0, is 0 on the bottom or the top?

I thought that the order in which I defined the annotation classes when I created the annotation feature class determined the zorder, but apparently that isn't true. I didn't see any specific interface in the interactive process to set the zorder of the annotation classes. Can I (do I have to) do it after the fact with ArcObjects? That would be fine. If so, what are the recommended interfaces to do it?

share|improve this question
up vote 1 down vote accepted

Drawing is not done by subclass, so you can't control the order. The order is determined by the feature return order from the database, which according to database theory should not be relied on to be determinable.

share|improve this answer
Well, that's just peachy. Guess I should have asked this earlier. It sinks my ship. Thanks you, Craig – celticflute Apr 15 '11 at 4:02
Hmmm, another idea ... What if I have an IFDOGraphicsLayer2 on my annotation layer and call DoAddFeature like thus: 'pFDOGraphicsLayer2.DoAddFeature(pFeature, pElement, zorder)`. Then I could specify a zorder ... but I'm not sure what that zorder is and how it affects annotation drawing. Any thoughts on this? – celticflute Apr 15 '11 at 16:25
While the API has a ZOrder, it is not used for draw order. How exactly are you trying to control order and why? Understanding this may help me recommend a better solution. – Craig Williams Apr 15 '11 at 16:33
It's related to the other question you have been helping me with. I create anno features that have graphic GroupElements as their elements, so these features do not support callouts. My idea was to create another piece of transparent, dummy annotation underneath each of the others that will carry a callout leader line. Kludgy but functional. I haven't gotten the SharedSymbol thing to work yet, though -- Python syntax problem. – celticflute Apr 15 '11 at 17:55

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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