VersionCol Add Method
See Also
This method is used to add 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. 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 this method to some of them, but not to others. This method works for:
- Target-Versions 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.
- Versions-of-Workspace collections. You can use this method to add an object version to the set of items contained in the workspace.
This method does not work for:
- Predecessor-Versions collection. To enlarge an object version's set of predecessors, use the MergeVersion method of the RepositoryObjectVersion object.
- Successor-Versions collection. To enlarge an object version's set of successors, use the CreateVersion method of the RepositoryObjectVersion object.
- Versions-of-Object collection. To enlarge an object's set of versions, use the CreateVersion method of the RepositoryObjectVersion object.
- Workspaces-of-Version collection. To enlarge the set of workspaces to which an item belongs, you do not add a workspace to an object version — rather you add the object version to a workspace. 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-of-Workspace collection. To checkout another item to a workspace, use the Checkout method of the RepositoryObjectVersion object.
(c) 1988-1998 Microsoft Corporation. All Rights Reserved.