Chapter 9 Accessing objects using VBScript
Consolidating repository documents
There are two ways to consolidate a repository document using VBScript:
- A generic way that is applicable to any repository document
- A specific way that is only applicable to RepositoryModel and RepositoryReport documents
Generic way
To consolidate any repository document you must:
- Specify a filename when using the following method ConsolidateDocument (ByVal FileName As String, ByVal MergeMode As Long = 2, ByRef Actions As String = NULL, ByRef Conflicts As String = NULL) As BaseObject)
Example
set C = RepositoryConnection
C.open
C.ConsolidateDocument ("c:\temp\test.txt")
Specific way
To consolidate a RepositoryModel document or a RepositoryReport document you can use one of the following methods:
- ConsolidateNew (ByVal RepositoryFolder As BaseObject, ByRef actions As String = NULL, ByRef conflicts As String = NULL) As BaseObject, to consolidate the first repository version of a document
- Consolidate (ByVal MergeMode As Integer = 2, ByRef actions As String = NULL, ByRef conflicts As String = NULL) As BaseObject, to consolidate additional repository versions of a document
Example
Set model = CreateModel(PdOOM.cls_Model, "|Diagram=ClassDiagram")
set C = RepositoryConnection
C.Open
model.ConsolidateNew c
Example
set C = RepositoryConnection
C.Open
model.Consolidate
Copyright (C) 2005. Sybase Inc. All rights reserved.
|
|