PowerDesigner 逻辑模型(Physical Data
我司工作中需要对大量逻辑模型进行统一处理,网上没有找到对逻辑模型的处理的相应方法,只有自己手撸了
'******************************************************************************
'* File: Export_model_to_excel.vbs
'* Purpose: Scan CDM Model and display objects information
' Export object desc to Excel
'* Title:
'* Category:
'* Version: 1.0
'* Company: Sybase Inc.
'******************************************************************************
Option Explicit
Dim nb
'
' get the current active model
'
Dim mdl ' the current model
Set mdl = ActiveModel
If (mdl Is Nothing) Then
MsgBox "There is no Active Model"
End If
Dim fldr
Set fldr = ActiveDiagram.Parent
ListObjects(fldr)
Sub ListObjects(fldr)
Dim obj ' running object
For Each obj In fldr.children
DescribeObject obj
Next
End Sub
Sub DescribeObject(CurrentObject)
if CurrentObject.ClassName ="Association-Class link" then exit sub
if CurrentObject.ClassName = "Entity" then
Dim obj ' running object
CurrentObject.comment = CurrentObject.name
For Each obj In CurrentObject.Attributes
output obj.code
obj.code = LCase(obj.code)
obj.comment = obj.name
Next
end if
End Sub
注:网络上也很难找到PowerDesigner vbs 相应开发文档,自己开发的话请参照PowerDesigne 安装目录下提供的vbs示例,默认路径为:C:\Program Files\SAP\PowerDesigner 16\VB Scripts。
本文标题:PowerDesigner 逻辑模型(Physical Data
本文链接:https://www.haomeiwen.com/subject/fkjjfrtx.html
网友评论