【powerdesigner】将数据库表中Common转为PDM表中Name
2017-02-28 16:07
330 查看
非原创,此文只为自己备忘!
执行方法:Open PDM -- Tools -- Execute Commands -- Run Script
代码如下:
Option Explicit
ValidationMode = True
InteractiveMode = im_Batch
Dim 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 code 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
if len(tab.comment) <> 0 then
tab.name = tab.comment
end if
On Error Resume Next
Dim col 'running column
for each col in tab.columns
if len(col.comment) <>0 then
col.name =col.comment
end if
On Error Resume Next
next
end if
next
end sub
执行方法:Open PDM -- Tools -- Execute Commands -- Run Script
代码如下:
Option Explicit
ValidationMode = True
InteractiveMode = im_Batch
Dim 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 code 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
if len(tab.comment) <> 0 then
tab.name = tab.comment
end if
On Error Resume Next
Dim col 'running column
for each col in tab.columns
if len(col.comment) <>0 then
col.name =col.comment
end if
On Error Resume Next
next
end if
next
end sub
相关文章推荐
- 【powerdesigner】将数据库表中Common转为PDM表中Name
- 【powerdesigner】将数据库表中Common转为PDM表中Name
- PowerDesigner逆向操作(从mysql5.0生成数据库的物理模型),把Comment写到name中,pdm文件导出为word
- PowerDesigner 从数据库反向生成Pdm时把Comment复制到Name中,从PowerDesigner导入数据库时把Name复制到Comment
- PowerDesigner从数据库中反向生成PDM,Name不显示字段说明的解决方法
- PowerDesigner中逆向工程将数据库中comment脚本赋值到PDM的name
- Powerdesigner的PDM(物理数据模型)生成数据库及逆向工程(将现有的数据库生成PDM)
- 如何用Powerdesigner的PDM(物理数据模型)生成数据库及逆向工程(将现有的数据库生成PDM)
- 如何用Powerdesigner的PDM生成数据库及逆向生成
- 如何用Powerdesigner的PDM(物理数据模型)生成数据库
- 如何用Powerdesigner的PDM(物理数据模型)生成数据库
- PowerDesigner从数据库导出pdm以及导出html格式数据字典
- Powerdesigner逆向工程从现有数据库生成PDM
- 如何用Powerdesigner的PDM(物理数据模型)生成数据库及逆向工程(将现有的数据库生成PDM)
- 如何用Powerdesigner的PDM(物理数据模型)生成数据库及逆向工程(将现有的数据库生成PDM)(转)
- 数据库中导出SQL,使用PowerDesigner 让SQL反向工程生成pdm数据库mode。
- powerDesigner12.5数据库物理模型(pdm)导出rtf
- PowerDesigner 数据库逆向工程,建name和comment 互换
- 如何用Powerdesigner的PDM(物理数据模型)生成数据库
- 怎样才能将数据库中表PBCATCOL的PBC_LABL字段的值反向到PDM对应的NAME?