1 PowerDesigner中批量根据对象的name生成comment的脚本
执行方法: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
tab.comment = tab.name
Dim col 'running column
for each col in tab.columns
col.comment= col.name
next
end if
next
Dim 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
--------------------------------
2 PowerDesigner中逆向工程将数据库中comment脚本赋值到PDM的name
执行方法: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
------------------------------------------------------------
相关推荐
通常数据表字段使用英文,备注comment完成字段的说明。使用该脚本能够在PowerDesigner批量生成SQL脚本时将name生成数据库中字段的comment
使用Powerdesigner生成sql脚本
PowerDesigner生成SQL脚本步骤详解.pdf
如何让PowerDesigner 自动生成 SQL Server 2000的表和列注释的脚本 ======================================= 1、将本包中的模板文件(Microsoft SQL Server 2000(带...
使用PowerDesigner通过excel模板文件与vb可执行代码,生成创建数据库sql建表语句脚本,资源包含.vb 和 excel模板文件。
使用步骤如下:1、在物理模型下按ctrl+shift+x, 2、在弹出的对话框左上方选择文件夹样式的图标 3、选择脚本文件,并run。
powerdesigner逆向工程导入mysql脚本生成PDM带全注释
当PowerDesigner连接好数据库,并生成模型后,在PowerDesigner用Ctrl+Shift+x快捷键打开,然后将脚本内容粘贴运行,就可以开始生成数据库中存在的注释了
PowerDesigner字段名生成备注说明脚本.vbs
使用PowerDesigner12.5设计数据库并生成MySQL脚本文件[整理].pdf
步骤: 1、用PowerDesigner打开要导出的PDM文件 2、Tools->Execute Commands -> Edit/Run Script... 3、点击Open图标(打开文件夹)找到该脚本文件 4、点击Run按钮
PowerDesigner反向工程将数据库设计导出: 1 导出SQL脚本 2 导出HTML用以展示模型效果 3 RTF(WORD)或者其他
PowerDesigner根据SQL语句自动生成ER图
这个功能只能用powerdesigner 的脚本功能来实现,使用起来也简单 打开powerdesigner,shift + ctrl + X 打开脚本窗口 输入执行的脚本,点 run 即可。 简单的导入Excel脚本
NULL 博文链接:https://superfofo.iteye.com/blog/635937
脚本是参考网络资源修改的,文档格式是个通用格式不针对特定公司需求
在PowerDesigner里执行脚本命令,从Excel里读取表结构生成pdm文件。
powerdesigner生成word、html模板,含数据库脚本,tables,table,column。点击report->generator report选择模板使用
powerDesigner 为表生成备注的脚本及使用方法
可以通过PowerDesigner生成数据表结构,打开pd脚本编辑器 PD菜单栏中,依次点击“Tools ->Excute Commands->Edit/Run Script..”,选择执行本文的vbs文件即可生成excel