PowerDesigner 将pdm模型表 用命令导出成Excel表格
使用步骤: 打开PowerDesigner 快捷键 Ctrl+Shift+X 直接将代码复制进去即可。
代码:
'******************************************************************************
'* File: pdm2excel.vbs
'* Purpose: 分目录递归,查找当前PDM下所有表,并导出Excel
'* Title:
'* Category:
'* Version: 1.0
'* Author: [email protected]
'******************************************************************************
Option Explicit
ValidationMode = True
InteractiveMode = im_Batch
' get the current active model
Dim mdl ' the current model
Set mdl = ActiveModel
Dim EXCEL,sheet,rowsNum
rowsNum = 1
If (mdl Is Nothing) Then
MsgBox "There is no Active Model"
Else
SetExcel
ListObjects(mdl)
End If
'-----------------------------------------------------------------------------
' Sub procedure to scan current package and print information on objects from current package
' and call again the same sub procedure on all children pacakge
' of the current package
'------------------------------------------------