supergan

Apply class extension to new feature class

Discussion created by supergan on Oct 25, 2010
Latest reply on Oct 25, 2010 by supergan
Hi,

I am have difficulty to apply class extension to new feature class. I use VB.Net in Visual Studio to develop ArcGIS desktop customization under ArcView license. Here is the steps that I follow to apply class extension:
1. Add a new ArcGIS class to my project, implementing IClassExtension, IObjectClassExtension, IFeatureClassExtension. (See attachment for code. The code is completely generated by VS, I didn't change anything)
2. Create feature class using FeatureWorkspace.CreateFeatureClass()

Here is the code to create feature class:
Dim extUID As IUID = New UIDClass()
extUID.Value = "{d2ae59fd-c1cd-47f1-8533-bc59a61f0aac}"  'ClassId of Class extension
Dim FeatureClass As IFeatureClass = Me.FeatureWorkspace.CreateFeatureClass(FeatureClassName, FeatureFields, Nothing, extUID, esriFeatureType.esriFTSimple, ShapeFieldName, "")

When I test my codes in VS, the feature class can be succssfully created. I expect EXTCLSID property of FeatureClass to be the extUID value but it appears as Nothing. I cannot figure out why the class extension cannot be applied to the feature class.

Any thoughts?

Thanks,

Attachments

Outcomes