Filtering Feature Templates

Discussion created by matthewb on Aug 15, 2012

I am looking for an efficient way to manage over 20 feature templates in code so that only the templates that are relevant for a particular workflow are shown. At present, a single feature class is used to store the sub types that are referenced by the feature templates. Basically, I want to set the visibility of a template to false so it doesn't show in the template picker. I know I could achieve this using multiple feature classes, but I would like to keep the data structure as simple as possible.

If I use featLayer.LayerInfo.FeatureTypesI can see the sub types but featLayer.LayerInfo.Templatesis null. I can see the symbols defined in the feature templates using featLayer.LayerInfo.Renderer. I must be missing something basic.

It would also be great if I could see an example of the FeatureTemplate constructor applied to a local feature service layer.

Many thanks,