PowerDesigner设计Name和注释相互替换
来源:互联网 发布:手机源码文件处理器 编辑:程序博客网 时间:2024/06/06 06:31
PowerDesigner设计 设计的表
Name是名称(字段描述),Code是字段名称,Comment是注释名称,ER图中显示的是Name。一般设计时,Name跟comment都设计成描述,
而设计时候常把comment写成中文,name保留跟code一致,保存完毕后,可以把comment替换到name上。当然也可以用name替换comment。具体方法如下:
1 将comment覆盖name
Option Explicit
ValidationMode = True
InteractiveMode = im_BatchDim mdl ' the current model
' get the current active model
Set mdl = ActiveModel
If (mdl Is Nothing) Then
MsgBox "There is no current Model "
ElseIf Not mdl.IsKindOf(PdPDM.cls_Model) Then
MsgBox "The current model is not an Physical Data model. "
Else
ProcessFolder mdl
End IfPrivate sub ProcessFolder(folder)
On Error Resume Next
Dim Tab 'running table
for each Tab in folder.tables
if not tab.isShortcut then
tab.name = tab.comment
Dim col ' running column
for each col in tab.columns
if col.comment="" then
else
col.name= col.comment
end if
next
end if
nextDim view 'running view
for each view in folder.Views
if not view.isShortcut then
view.name = view.comment
end if
next' go into the sub-packages
Dim f ' running folder
For Each f In folder.Packages
if not f.IsShortcut then
ProcessFolder f
end if
Next
end sub
2 将name覆盖comment
----------------------------Option Explicit
ValidationMode = True
InteractiveMode = im_BatchDim mdl ' the current model
' get the current active model
Set mdl = ActiveModel
If (mdl Is Nothing) Then
MsgBox "There is no current Model "
ElseIf Not mdl.IsKindOf(PdPDM.cls_Model) Then
MsgBox "The current model is not an Physical Data model. "
Else
ProcessFolder mdl
End If' This routine copy name into comment for each table, each column and each view
' of the current folder
Private sub ProcessFolder(folder)
Dim Tab 'running table
for each Tab in folder.tables
if not tab.isShortcut then
tab.comment = tab.name
Dim col ' running column
for each col in tab.columns
col.comment= col.name
next
end if
nextDim view 'running view
for each view in folder.Views
if not view.isShortcut then
view.comment = view.name
end if
next' go into the sub-packages
Dim f ' running folder
For Each f In folder.Packages
if not f.IsShortcut then
ProcessFolder f
end if
Next
end sub
以上两段代码都是VB脚本,在PowerDesigner中使用方法为:
PowerDesigner->Tools->Execute Commands->Edit/Run Scripts 将代码Copy进去执行就可以了,
- PowerDesigner设计Name和注释相互替换
- PowerDesigner设计Name和Comment 替换
- PowerDesigner Comment和name相互转化
- PowerDesigner注释和name之间的互转
- PowerDesigner反向生成PDM和name与注释互换
- PowerDesigner反向生成PDM和name与注释互换
- PowerDesigner反向生成PDM和name与注释互换
- powerdesigner,把comment替换成name和把name替换成comment
- powerdesigner 把name生成注释
- PowerDesigner Code和Name
- PowerDesigner comment与name相互复制
- PowerDesigner Name/Code自动调整 中文注释
- PowerDesigner 中 根据对象的name和comment 生成注释的办法
- PowerDesigner Comment与name的相互装换
- powerDesigner 把name项添加到注释(comment)
- PowerDesigner 的mysql PDM 的COMMENT注释改为name+comment
- PowerDesigner 中 Code 和 Name 区别
- PowerDesigner中name和comment互換
- 3D PRINT:Turn digital bits into physical atoms
- 泛型是Java SE 1.5
- iOS之label居中,内容按中间两边延伸
- 一张图看懂中国本土手机链
- ubuntu 13.10 install wine
- PowerDesigner设计Name和注释相互替换
- lua通讯错误
- Java基础知识<3>-面向对象程序设计
- 安卓短信发送器
- listview 多选
- ios类别categary
- Eclipse集成CVS Update时报错的原因及解决办法
- Step.js 使用教程(附源码解析)
- notepad++ 正则表达式 应用案例2