Chapter 7 Scripting PowerDesigner
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:
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:
Set model = CreateModel(PdOOM.cls_Model, "|Diagram=ClassDiagram") set C = RepositoryConnection C.Open model.ConsolidateNew c
set C = RepositoryConnection C.Open model.Consolidate
Copyright (C) 2008. Sybase Inc. All rights reserved. |
![]() |