Howto get the AnnotationProperties of an IAnnotationLayer?

1460
1
Jump to solution
07-06-2016 07:21 AM
PieterLinks
New Contributor III

Hello,

How do I get the AnnotationProperties of a IAnnotationLayer? A non-annotation IFeaturelayer is also a IGeoFeatureLayer, which has an IAnnotateLayerPropertiesCollection, but an IAnnotationLayer has not.

I'm aware of the IAnnoClass and IAnnoClassExtension, but how to get there?

IAnnoClass annoClass = featureLayer.FeatureClass as IAnnoClass doesn't work, it returns null.

Kind regards,

Pieter

0 Kudos
1 Solution

Accepted Solutions
PieterLinks
New Contributor III

Found after a search on the web in annotation - ArcObjects Anno Classes - Geographic Information Systems Stack Exchange

IAnnotationClassExtension annoClassExtension = featureLayer.FeatureClass.Extension as IAnnotationClassExtension;

IAnnotateLayerPropertiesCollection annoLayerPropsCollection = annoClassExtension.AnnoProperties;

...  etcetera

Thanks anyway,

Pieter

View solution in original post

0 Kudos
1 Reply
PieterLinks
New Contributor III

Found after a search on the web in annotation - ArcObjects Anno Classes - Geographic Information Systems Stack Exchange

IAnnotationClassExtension annoClassExtension = featureLayer.FeatureClass.Extension as IAnnotationClassExtension;

IAnnotateLayerPropertiesCollection annoLayerPropsCollection = annoClassExtension.AnnoProperties;

...  etcetera

Thanks anyway,

Pieter

0 Kudos