您的位置:首页 > 其它

PowerDesigner--comment和name互相复制

2015-05-09 17:36 381 查看
1、comment复制到name 脚本代码:

Option Explicit
ValidationMode = True
InteractiveMode = im_Batch
Dim mdl
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
Private sub ProcessFolder(folder)
Dim Tab
for each Tab in folder.tables
if not tab.isShortcut then
tab.name=tab.comment
Dim col
for each col in tab.columns
col.name=col.comment
next
end if
next
end sub

2、name复制到comment 脚本代码:

Option Explicit
ValidationMode = True
InteractiveMode = im_Batch
Dim mdl
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
Private sub ProcessFolder(folder)
Dim Tab
for each Tab in folder.tables
if not tab.isShortcut then
tab.comment=tab.name
Dim col
for each col in tab.columns
col.comment=col.name
next
end if
next
end sub
复制上述脚本,在PowerDesigner中依次点击:Tools->Execute Commands->Edit/Run Script,粘贴代码到下面的文本框,点击 Run 按钮即可实现相应的复制。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐