Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I am working in Python 2.6 and ArcGIS 10.0 through comtypes, so I have full ArcObjects access. (See the answer I tacked onto the related question "How do I access arcobjects from python?") That makes this strictly an object model traversal question.

I have an IFeatureClass on an annotation feature class. I need to get to IAnnoClass to get the ReferenceScale property. How do I do that?

I'm guessing that it starts with the Extension property inherited from IClass, but I may be way off base. Thank you, all.

Cheers, Ti

share|improve this question
add comment

1 Answer 1

up vote 5 down vote accepted

If a feature class is an annotation class, its IFeatureClass.Extension will be a reference to the AnnotationFeatureClassExtension coclass instance. It can be directly cast to IAnnoClass interface.

In short, you are right, the Extension property will be an object which implements IAnnoClass.

share|improve this answer
    
Thank you, Petr. Worked like a charm. –  celticflute Jan 10 '11 at 20:27
add comment

Your Answer

 
discard

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.