RelationshipCol 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 RepositoryObjectVersion to the source object version of the collection. The new relationship is passed back to the caller.
Set variable = object.Add(reposObj, objName)
The Add method syntax has the following parts.
|variable||A variable declared as a VersionedRelationship object. It receives the new relationship that is created for the reposObj RepositoryObjectVersion.|
|object||An object expression that evaluates to a RelationshipCol object.|
|reposObj||The RepositoryObjectVersion whose relationship is to be added to the collection.|
|objName||The name that the new relationship is to use for reposObj. This parameter is optional.|
You can add a relationship to a collection only when the collection's source object is also the collection's origin object.
When you call this method, the origin version must be unfrozen.
You can use this method to create a new versioned relationship between the source object version and a version of the target object. You cannot use it to add to a versioned relationship. If the source object version is already related to any version of the target object, this method fails. You can include another version of the target object in the versioned relationship by adding an item to the versioned relationship's TargetVersions collection.
The value of plReposObj is the specific version of the target object.
If you are operating within the context of a workspace, the target object version you specify with plReposObj must be present in the workspace.