This document is archived and information here might be outdated.  Recommended version.

IVersionedObject.RegisterAsVersioned Method (ArcObjects .NET 10.8 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > Geodatabase > ESRI.ArcGIS.GeoDatabase > Interfaces > IV > IVersionedObject Interface > IVersionedObject.RegisterAsVersioned Method
ArcGIS Developer Help

IVersionedObject.RegisterAsVersioned Method

Register/UnRegister the object as being versioned.

[Visual Basic .NET]
Public Sub RegisterAsVersioned ( _
    ByVal isVersioned As Boolean _
public void RegisterAsVersioned (
    bool isVersioned
HRESULT RegisterAsVersioned(
  VARIANT_BOOL isVersioned
isVersioned [in]

isVersioned is a parameter of type bool

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Errors Returned

FDO_E_SE_NO_PERMISSIONS: Insufficient permissions.


The RegisterAsVersioned method registers or unregisters datasets. Feature classes that participate in feature datasets can be registered or unregistered, although it is highly recomended that the operation be performed on the entire feature dataset. The method requires a boolean argument, true to register or false to unregister the object.

Unregistering an object class as versioned permanently drops the object's delta tables. To preserve the edits, perform a compress prior to unregistering as versioned. See IVersionedWorkspace.Compress and IVersionedObject2 for additional information.

Only the owner can register or unregister the object.

By programmatically registering a class participating in a geometric network as versioned it does not guarantee the entire geometric network including other participating classes will also be registered. It is then recommended the registration take place at the feature dataset level rather than on the individual feature class. This workflow is exposed by default through the user interface in ArcCatalog. If there is a need to register individual classes as versioned within a feature dataset without registering the entire dataset it is crucial the every class participating in a geometric network, including the geometric network itself, is explicitly registered individually.

Archiving must first be disabaled on a class before it can be unregistered as versioned. This situation only applies to classes that have been registered as versioned with the MoveEditsToBase option set to false through the IVersionObject3.RegisterAsVersioned3 method.


See Also

IVersionedObject Interface