Is there a way to programatically register a feature class as versioned?

I'm able to register aFeatureDatasetwith the IVersionObject3 interface, but not an individual feature class.

1 Answer 1


According to this example:

public void RegisterDataset(IDataset dataset)
    IVersionedObject3 versionedObject = (IVersionedObject3)dataset;

    bool IsRegistered;
    bool IsMovingEditsToBase;

    versionedObject.GetVersionRegistrationInfo(out IsRegistered, out IsMovingEditsToBase);

            //first unregister without compressing edits

            //then register as fully versioned
        //registering as fully versioned

IVersionedObject3 is implemented by IDataset. IDataset implements IFeatureClass and IFeatureDataset so it should work for either.

  • According to the documentation (resources.arcgis.com/en/help/arcobjects-net/componenthelp/…), IVersionedObject3 is implemented by NetworkDataset, CadastralFabric, StreetNetwork and Utility network... So, In theory, there is no way I can cast a FeatureClass insite a IVersionedObject3. In the same way, looking at the FeatureClass coclass documentation(resources.arcgis.com/en/help/arcobjects-net/componenthelp/…), there is no sign of IVersionEdit implementation.
    – Goldorak84
    Jul 31, 2014 at 11:57
  • Even if it's not documented, I tested you solution and it works! Esri should update it's documentation though.
    – Goldorak84
    Jul 31, 2014 at 12:03
  • 1
    Yes I think so. The listed interfaces do not include IDataset and as it implements that I think that's important. I think Esri has a "suggestions box"; it would be worth logging this as a deficiency. Jul 31, 2014 at 21:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.