复制下面脚本,在PowerDesigner中依次点击:Tools->Execute Commands->Edit/Run Script,粘贴代码到下面的文本框,点击 Run 按钮即可实现相应的复制
注意:因name列不允许重复,所以在执行脚本时,comment列中不能出现重复信息
1、comment复制到name 脚本代码:
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
tab.name=tab.comment
Dim col
for each col in tab.columns
col.name=col.comment
next
end if
next
end sub
2、name复制到comment 脚本代码
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
tab.comment=tab.name
Dim col
for each col in tab.columns
col.comment=col.name
next
end if
next
end sub
相关推荐
PowerDesigner->Tools->Execute Commands->Edit/Run Scripts 将comment覆盖name。 将name自动填充到注释(comment)。
可以很好的实现comment和name之间的相互转换,针对mysql数据库表的设计很方便
使用PowerDesigner我经常只设置了Name和code,但是数据库里显示不了Name,显示的是描述,及comment。所以我可以通过执行一个脚本批量把列名(name)复制为描述(comment)。
NULL 博文链接:https://yanfei133.iteye.com/blog/1483094
powerdesigner视图不支持name,code,comment(列注释)同时显示,本文档完美解决了这个问题。快乐源于分享,需要的拿走
将powerdesigner中物理模型的英文字段名称转换为显示注释
PowerDesigner 中name和comment 互换脚本,可以使用。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。
PowerDesigner 中把Name值批量复制到Comment实用脚本,注意是在CDM和PDM中运行此脚本便可.PowerDesigner->Tools->Execute Commands->Edit/Run Scripts
PowerDesigner里执行脚本命令,把comment列的内容批量复制到name列。
在数据库设计中,经常使用数据库逆向工程,将数据库中库表结构转为PDM,为了阅读方便,需要将将表字段的comment转换为PDM的name。该文件解决此问题
通常数据表字段使用英文,备注comment完成字段的说明。使用该脚本能够在PowerDesigner批量生成SQL脚本时将name生成数据库中字段的comment
在使用PowerDesigner对数据库进行概念模型和物理模型设计时,一般在NAME或Comment中写中文,在Code中写英文。Name用来显 示,Code在代码中使用,但Comment中的文字会保存到数据库Table或Column的Comment中,当Name...
PowerDesigner里执行脚本命令,把name列的内容批量复制到comment列。
powerDesigner 把name项添加到comment 使用方法使用方法 PowerDesigner->Tools->Execute Commands->Edit/Run Scripts 可以保存该脚本为:name2comment.vbs
PowerDesigner 中将Comment(注释)及Name(名称)内容互相COPY的VBS代码
NULL 博文链接:https://stunizhengjia.iteye.com/blog/2018543
PowerDesigner15-将Name中的字符COPY至Comment中.vbs
PowerDesigner中使name列的值等于comment列的值的脚本,亲测可用
powerdesigner逆向工程导入mysql脚本生成PDM带全注释
1 安装ODBC驱动,2 在控制面板添加添加ODBC,3 PowerDesigner连接MYSQL,4 MySQL表结构导入到PowerDesigner,5 显示Comment列,6 PowerDesigner表结构连同中文注释导入到MySQL