How To: Remove a feature class extension from a geodatabase
In a scenario where a feature class extension is created on Computer A (which has ArcGIS Desktop installed), users follow this two-step workflow:
- Register the class extension's DLL with ArcGIS Desktop.
- Apply the class extension programmatically to a particular feature class, using:
IClassSchemaEdit2.AlterClassExtensionCLSID(extUID, extensionProperties)This is based on the ArcObjects .NET Web Help documentation, Creating class extensions.
classSchemaEdit.AlterClassExtensionCLSID(null, null)This is because ArcGIS Desktop or Engine must be registered with the class extension before it can be removed. The instructions provided describe how to remove a feature class extension from a geodatabase.
- Copy the class extension DLL to the new computer, and register it by running EsriRegAsm.exe against Desktop or Engine.
- Connect to the enterprise geodatabase (using a Direct Connect SDE connection) that contains the feature classes that have the associated class extension and programmatically remove the class extension by calling the following code:
classSchemaEdit.AlterClassExtensionCLSID(null, null)The above line of code can be called from a standalone console application, or an ArcMap add-in OnClick event.
- Unregister the class extension using EsriRegAsm against Desktop or Engine.
- Create a new class extension in Visual Studio and follow the aforementioned two-step workflow to enable the class extension on the same feature classes.
- Register the new class extension with ArcGIS Desktop or Engine
- Apply the class extension to one or more feature classes using a console or desktop application by executing: