Select to view content in your preferred language

Apply class extension to new feature class

1982
1
10-25-2010 10:49 AM
ChenglinGan
Emerging Contributor
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,
0 Kudos
1 Reply
ChenglinGan
Emerging Contributor
I got it.....I was trying to apply class extension to a feature class resides in In Memory workspace. Custom feature class is not supported by InMemory workspace.:(
0 Kudos