powerdesign 中,将数据库中可以逆向生成pdm的结构图,比较清晰看到系统的结构,
但假如是db先行的话,一般是db中的每个列中用comment中文注释说明这列是
干什么的,但逆向工程后,会发现pd中的name和code都变成中文,
其中我们期望的是name是中文,code是英文(就是db中的列),那么我们其实
可以将db中的comment跟name进行一个复制,把comment中的内容都全部复制到
name中去就可以了,网上找到这个VBS脚本,原来pd中的也可以用VBS对PD的对象进行编程的,
VBS脚本如下:
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
if (not isnull(tab.comment)) and (trim(tab.comment)<>"") then
tab.name = tab.comment
end if
Dim col
for each col in tab.columns
if (not isnull(col.comment)) and (trim(col.comment)<>"") then
col.name= col.comment
end if
next
end if
next
Dim view
for each view in folder.Views
if not view.isShortcut then
if (not isnull(view.comment)) and (trim(view.comment)<>"") then
view.name = view.comment
end if
end if
next
end sub
在tools-execute command-run script中输入上面的脚本就可以运行了,十分方便。
当然,在db中加上comments是个良好的习惯。
分享到:
相关推荐
powerdesign 逆向工程完成后,数据库中comment脚本
使用powerDesign逆向工程,详细 图示 叫你一步步完成。
PowerDesign逆向工程笔记,使用PowerDesign逆向工程读取数据库中表信息
PowerDesigner 中name和comment 互换脚本,可以使用。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。
NULL 博文链接:https://yanfei133.iteye.com/blog/1483094
powerdesign逆向图生成指南,操作简便,有图有真相
本机电脑为64win7系统,64位oracle11gr2数据库,使用powerdesign连接oracle时,常出现的两类错误提示的解决办法
PowerDesigner16.5逆向工程显示字段备注,生成的更贴合。使用的是命令运行的方式,本人亲试,非常方便。
powerdesigner视图不支持name,code,comment(列注释)同时显示,本文档完美解决了这个问题。快乐源于分享,需要的拿走
powerdesign表结构导出到EXCEL脚本
power design 12 教程 chm
powerdesigner逆向工程导入mysql脚本生成PDM带全注释
Low Power Design Low Power Design
powerDesign.chm 中文手册 chm版powerDesign.chm 中文手册 chm版
PowerDesign12.5破解版的下载,软件有125M,比较大,我将它存到网盘供大家下载,这个软件下载的资源比较多,但重要的是如何使用UML建模工具,帮助我们解决实际问题。利用UML的13种图(用例图,类图,对象图,包图,...
完整的powerdesign12.5的汉化及破解 完整的powerdesign12.5的汉化及破解 完整的powerdesign12.5的汉化及破解
PowerDesign 15 PowerDesign15 破解文件
PowerDesign 12.5 汉化补丁,解压后,直接拷贝到安装目录下,替换原有的文件即可。 下载 PowerDesigner12.5 后有一个 license.lic 和 pdflm12.dll 两个文件,license.lic 是用于破解序号的,pdflm12.dll 是用于替换...
power design 16 破解补丁
Powerdesign连接远程oracle数据库;其他数据库类似。按文档步骤操作,powerdesign可以实现与oracle数据库同步,导入导出表信息等。