执行方法: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逆向工程导入mysql脚本生成PDM带全注释
PowerDesigner反向生成ER图
通常数据表字段使用英文,备注comment完成字段的说明。使用该脚本能够在PowerDesigner批量生成SQL脚本时将name生成数据库中字段的comment
Powerdesigner逆向工程生成PDM 中文列名表名替换为注释
使用PowerDeSigner逆向生成Mysql数据库PDM图(带中文注释)-附件资源
powerDesigner 反向生成数据库所需驱动,有32位和64位的驱动
使用Powerdesigner的逆向工程生成PDM.pdf
通过配置资源库,使用PowerDesigner工具根据数据库中表之间的关系生成PDM模型。
Powerdesigner连接Mysql数据库生成PDM
在PowerDesigner里执行脚本命令,从Excel里读取表结构生成pdm文件。
用PowerDesigner反向工程生成E-R图
在数据库设计中,经常使用数据库逆向工程,将数据库中库表结构转为PDM,为了阅读方便,需要将将表字段的comment转换为PDM的name。该文件解决此问题
当PowerDesigner连接好数据库,并生成模型后,在PowerDesigner用Ctrl+Shift+x快捷键打开,然后将脚本内容粘贴运行,就可以开始生成数据库中存在的注释了
利用powerdesigner反向数据库结构,生成ER图
用PowerDesigner自动生成数据库的表结构的方法,很实用哦~
用PD生成sql建立数据库和PowerDesigner反向生成数据字典PPT课件.pptx
PowerDesigner生成数据字典(包含反向工程生成方法).docx
PowerDesigner->Tools->Execute Commands->Edit/Run Scripts 将comment覆盖name。 将name自动填充到注释(comment)。
PowerDesigner反向生成PDM, PDM生成DOC
利用powerdesigner连接数据库,反向生成pdm文件。用于保存数据库表结构