VersionCol Add Method

Meta Data Services Programming

Meta Data Services Programming

VersionCol Add Method

This method adds a new item to a relationship collection, when the sequencing of relationships in the collection is not important. The new relationship connects the reposObj object version to the source object version of the collection. The new relationship is passed back to the caller.

Syntax

Set variable  =  object.Add(reposVersion)

The Add method syntax has the following parts.

Part Description
variable A variable declared as a RepositoryObjectVersion object. It receives the object version that is added to the collection.
object The version collection.
reposVersion The Repository object version to be added to the collection.
Remarks

There are many different kinds of object-version collections. You can apply the Add method to some of them, but not to others. This method succeeds for:

  • TargetVersions collections. You can use this method to enlarge the set of versions of a particular target object that are related to a particular source object.

  • Contents collections. You can use this method to add an object version to the set of items contained in the workspace.

This method fails for:

  • Predecessors collection. To enlarge an object version's set of predecessors, use the MergeVersion method of the RepositoryObjectVersion object.

  • Successors collection. To enlarge an object version's set of successors, use the CreateVersion method of the RepositoryObjectVersion object.

  • ObjectVersions collection. To enlarge an object's set of versions, use the CreateVersion method of the RepositoryObjectVersion object.

  • Workspaces collection. To enlarge the set of workspaces to which an item belongs, you add the object version to a workspace, rather than add a workspace to an object version. In other words, you use the Add method of the VersionCol object, but the version collection you are manipulating is the Versions-of-Workspace collection, not the Workspaces-of-Version collection.

  • Checkouts collection. To check out another item to a workspace, use the Checkout method of the Workspace object.

See Also

Kinds of Version Collections