cancel
Showing results for 
Search instead for 
Did you mean: 

Automate RTF Data Dictionary generation

former_member1194361
Participant
0 Kudos

Hi there,

New to VBScripting, so need some help. I don't know where to find out all functions available for say ActiveModel

How do I modify this script so that it only generates the data dictionary for currently open Diagram. Right now it is doing it for every diagram in the data model.

Dim model

set m = ActiveModel

For each r in m.Reports

filename = "C:\Desktop\temp\PDmacro\" & r.Name & ".rtf"

r.GenerateRTF (filename)

Next

Read about this script here...

http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.infocenter.dc38628.1653/doc/html/rad12...

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member200945
Contributor
0 Kudos

Hi Navin,


As your code has demonstrated, Reports component belong to Model object, not Diagram.

You cannot simply modify your code to achieve the goal.

But you can use the following method:

1) Open your current diagram, run the following code:

set symbols=ActiveDiagram.symbols

for each s in symbols

output s.displayName

next

This  shows you all symbols in current diagram.

You want to use this information to generate report.

You need mark each symbol using extended attribute. Delete all symbols do not belong to

current diagram.

2) Based on information in 1), delete all objects do not show up in current diagram.

Note that each symbol name is  exact the same as object name.

For example, you see symbol Table_1. Its object name is also Table_1

3) Now the model only contains your current diagram and all objects it contains.

    Run the code to generate report.

You can use Powerdesigne Transformation to run above step.

a) Create pre transformation for step 1 and 2

b) Create post transformation for step 3