IVersionedObject Interface

Provides access to members that manage a versioned object.

Description

The IVersionedObject interface is used to determine the current version of an object, to register feature datasets or object classes as versioned, and to detect if the object class is registered as versioned.

Members

Name Description
Method GetVersionRegistrationInfo Indicates if this object is registered as versioned and is moving edits to base.
Read-only property HasUncompressedEdits Indicates if the object has edits that haven't been compressed yet.
Read-only property IsRegisteredAsVersioned Indicates if the object is registered as versioned.
Method RegisterAsVersioned Register/UnRegister the object as being versioned.
Method RegisterAsVersioned3 Register this object as versioned with the option to move edits to base.
Method SupportsMovingEditsToBase Indicates if this object supports moving edits to base as a RegisterAsVersioned3 option.
Method UnRegisterAsVersioned3 UnRegister this object as versioned with the option to compress the Default edits to base.
Read-only property Version The object's current version.

IVersionedObject.GetVersionRegistrationInfo Method

Indicates if this object is registered as versioned and is moving edits to base.

Public Sub GetVersionRegistrationInfo ( _
    ByRef isRegistered As Boolean, _
    ByRef isMovingEditsToBase As Boolean _
)
public void GetVersionRegistrationInfo (
    ref bool isRegistered,
    ref bool isMovingEditsToBase
);

IVersionedObject.HasUncompressedEdits Property

Indicates if the object has edits that haven't been compressed yet.

Public ReadOnly Property HasUncompressedEdits As Boolean
public bool HasUncompressedEdits {get;}

IVersionedObject.IsRegisteredAsVersioned Property

Indicates if the object is registered as versioned.

Public ReadOnly Property IsRegisteredAsVersioned As Boolean
public bool IsRegisteredAsVersioned {get;}

Remarks

Returns if the underlying dataset is registered as versioned. This only applies to datasets that exist in versioned workspaces.

IVersionedObject.RegisterAsVersioned Method

Register/UnRegister the object as being versioned.

Public Sub RegisterAsVersioned ( _
    ByVal isVersioned As Boolean _
)
public void RegisterAsVersioned (
    bool isVersioned
);

Errors Returned

FDO_E_SE_NO_PERMISSIONS: Insufficient permissions.

Remarks

The RegisterAsVersioned method registers or unregisters datasets. Feature classes that participate in feature datasets can be registered or unregistered, although it is highly recommended that the operation is performed on the entire feature dataset. The method requires a boolean argument,Trueto register or Falseto 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.

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 that every class participating in a geometric network, including the geometric network itself, is explicitly registered individually.

Archiving must first be disabled 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 IVersionObject.RegisterAsVersioned3 method.

IVersionedObject.RegisterAsVersioned3 Method

Register this object as versioned with the option to move edits to base.

Public Sub RegisterAsVersioned3 ( _
    ByVal moveEditsToBase As Boolean _
)
public void RegisterAsVersioned3 (
    bool moveEditsToBase
);

Remarks

To register datasets as versioned with the option to move edits to default.

IVersionedObject.SupportsMovingEditsToBase Method

Indicates if this object supports moving edits to base as a RegisterAsVersioned3 option.

Public Function SupportsMovingEditsToBase ( _
) As Boolean
public bool SupportsMovingEditsToBase (
);

IVersionedObject.UnRegisterAsVersioned3 Method

UnRegister this object as versioned with the option to compress the Default edits to base.

Public Sub UnRegisterAsVersioned3 ( _
    ByVal compressDefault As Boolean _
)
public void UnRegisterAsVersioned3 (
    bool compressDefault
);

Remarks

Unregistering a dataset or class object as versioned permanently drops the object's delta tables. To preserve the edits on the default version, set compressDefaulttrue.

Archiving must first be disabled 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 IVersionObject.RegisterAsVersioned3 method.

IVersionedObject.Version Property

The object's current version.

Public ReadOnly Property Version As IVersion
public IVersion Version {get;}

Remarks

The Version method returns an IVersion object that is the current version the object references. This provides a mechanism to easily detect the version of the database that an object references.

Classes that implement IVersionedObject

Classes Description

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.