Consolidating a Repository Document

There are two ways to consolidate a repository document using scripting:

To consolidate any document:

Use the following

Description

ConsolidateDocument(ByVal FileName As String, ByVal MergeMode As Long = 2, ByRef Actions As String = NULL, ByRef Conflicts As String = NULL) As BaseObject

Method on RepositoryFolder that allows you to consolidate any kind of document

To consolidate a PowerDesigner document:

Use the following

Description

ConsolidateNew(ByVal RepositoryFolder As BaseObject, ByRef actions As String = NULL, ByRef conflicts As String = NULL) As BaseObject

Method on BaseModel that allows you to consolidate PowerDesigner documents

Consolidate(ByVal MergeMode As Integer = 2, ByRef actions As String = NULL, ByRef conflicts As String = NULL) As BaseObject

Method on BaseModel that allows you to consolidate additional repository versions of a PowerDesigner document

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

Examples:

Set model = CreateModel(PdOOM.cls_Model, "|Diagram=ClassDiagram")
set C = RepositoryConnection
C.Open
model.ConsolidateNew c
set C = RepositoryConnection
C.Open
model.Consolidate