1、脚本(来源网络)
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
分享到:
相关推荐
在数据库设计中,经常使用数据库逆向工程,将数据库中库表结构转为PDM,为了阅读方便,需要将将表字段的comment转换为PDM的name。该文件解决此问题
powerdesigner逆向工程导入mysql脚本生成PDM带全注释
Powerdesigner逆向工程生成PDM 中文列名表名替换为注释
利用powerdesigner连接数据库,反向生成pdm文件。用于保存数据库表结构
配置方法: 替换DBMS配置文件 位置:\Sybase\PowerDesigner 12\Resource Files\DBMS\oracl10g.xdb 完成后执行反向工程即可,反向工程的时候DBMS选择Oracle version 10g就可以了
自己使用powerdesigner16.0的反向工程将oracle10g中的数据结构转换成er图,我将这一过程 以截图的形式记录下来了,希望对有相同需求的朋友有所帮助。
使用Powerdesigner的逆向工程生成PDM.pdf
PowerDesigner导出的SQL带列注释,导入到MySQL中列注释不见了的处理方法
在PowerDesigner里执行脚本命令,从Excel里读取表结构生成pdm文件。
PowerDesigner逆向工程-Mysql,并解决没有注释的问题!
PowerDesigner->Tools->Execute Commands->Edit/Run Scripts 将comment覆盖name。 将name自动填充到注释(comment)。
使用PowerDeSigner逆向生成Mysql数据库PDM图(带中文注释)-附件资源
PowerDesigner逆向工程生成PDM模型及数据库
PowerDesigner反向工程使用方法.doc
1 安装ODBC驱动,2 在控制面板添加添加ODBC,3 PowerDesigner连接MYSQL,4 MySQL表结构导入到PowerDesigner,5 显示Comment列,6 PowerDesigner表结构连同中文注释导入到MySQL
通常数据表字段使用英文,备注comment完成字段的说明。使用该脚本能够在PowerDesigner批量生成SQL脚本时将name生成数据库中字段的comment
PowerDesigner逆向工程导入MYSQL数据库总结 PowerDesigner逆向工程导入MYSQL数据库总结
当PowerDesigner连接好数据库,并生成模型后,在PowerDesigner用Ctrl+Shift+x快捷键打开,然后将脚本内容粘贴运行,就可以开始生成数据库中存在的注释了
PowerDesigner16.5逆向工程显示字段备注,生成的更贴合。使用的是命令运行的方式,本人亲试,非常方便。
powerDesigner 把name项添加到comment 使用方法使用方法 PowerDesigner->Tools->Execute Commands->Edit/Run Scripts 可以保存该脚本为:name2comment.vbs