- 打开PowerDesigner,找到创建的物理模型(Physical Data Model),
- 使用快捷键,或者 在PowerDesigner菜单栏中,依次点击“Tools ->Excute Commands->Edit/Run Script..”
- 将下面代码粘贴到空白,点击Run
- 将导出的结果(Excel)保存到自己的位置
'******************************************************************************
'* File: pdm2excel
'* Title: pdm export to excel
'* Purpose: To export the tables and columns to Excel
'* Model: Physical Data Model
'* Objects: Table, Column, View
'* Version: 1.0
'******************************************************************************
Option Explicit
Dim rowsNum
rowsNum = 0
'-----------------------------------------------------------------------------
' Main function
'-----------------------------------------------------------------------------
' Get the current active model
Dim Model
Set Model = ActiveModel
If (Model Is Nothing) Or (Not Model.IsKindOf(PdPDM.cls_Model)) Then
MsgBox "The current model is not an PDM model."
Else