VersionCol Remove Method

Meta Data Services Programming

Meta Data Services Programming

VersionCol Remove Method

This method deletes an object version from a version collection.

Syntax

Call object.Remove(index)
Call
object.Remove(objectId)
Call
object.Remove(objectVersionId)

The Remove method syntax has the following parts.

Part Description
object The version collection.
index The index of the item to be removed from the collection.
objectID The object identifier for the object version or workspace to be removed from the collection. You can supply an objectID only for the Versions-of-Workspace collection, the Workspaces-of-Version collection, or the Checkouts-of-Workspace collection.
objectVersionID The object-version identifier for the item to be removed from the collection. You can supply an objectVersionID for any version collection.

Remarks

There are many different kinds of object-version collections. You can apply this method to some of them, but not to others. The Remove method works for:

  • Target-Versions collections. You can use this method to reduce the set of versions of a particular target object that are related to a particular source object.

  • Versions-of-Workspace collections. You can use this method to remove an object version to the set of items contained in the workspace.

This method fails for:

  • Predecessor-Versions collections. To enlarge an object version's set of predecessors, use the MergeVersion method of the RepositoryObjectVersion object.

  • Successor-Versions collections. To enlarge an object version's set of successors, use the CreateVersion method of the RepositoryObjectVersion object.

  • Versions-of-Object collections. To enlarge an object's set of versions, use the CreateVersion method of the RepositoryObjectVersion object.

  • Workspaces-of-Version collections. To remove a workspace from the set of workspaces in which an object version is present, you must explicitly remove the object version from that workspace's Versions-of-Workspace collection.

  • Checkouts-of-Workspace collections. To reduce the number of items checked out to a workspace, use the Checkin method of the Workspace object.

See Also

Kinds of Version Collections

VersionCol Object