Powerdesigner Name与Comment的互相转换
使用说明: 在【Tools】-【Execute Commands】-【Edit/Run Script】 下。输入下面你要选择的语句即可:
1、Name填充Comment
'把pd中那么name想自动添加到comment里面
'如果comment为空,则填入name;如果不为空,则保留不变,这样可以避免已有的注释丢失. 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 comment 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 trim(tab.comment)="" then'如果有表的注释,则不改变它.如果没有表注释.则把name添加到注释里面.
tab.comment = tab.name
end if
Dim col ' running column
for each col in tab.columns
if trim(col.comment)="" then '如果col的comment为空,则填入name,如果已有注释,则不添加;这样可以避免已有注释丢失.
col.comment= col.name
end if
next
end if
next Dim view 'running view
for each view in folder.Views
if not view.isShortcut and trim(view.comment)="" 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、Comment填充Name
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 Private sub ProcessFolder(folder)
On Error Resume Next
Dim Tab 'running table
for each Tab in folder.tables
if not tab.isShortcut then
tab.name = tab.comment
Dim col ' running column
for each col in tab.columns
if col.comment="" then
else
col.name= col.comment
end if
next
end if
next Dim view 'running view
for each view in folder.Views
if not view.isShortcut then
view.name = view.comment
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
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
Private sub ProcessFolder(folder)
On Error Resume Next
Dim Tab 'running table
for each Tab in folder.tables
if not tab.isShortcut then
tab.name = tab.comment
Dim col ' running column
for each col in tab.columns
if col.comment="" then
else
col.name= col.comment
end if
next
end if
next
Dim view 'running view
for each view in folder.Views
if not view.isShortcut then
view.name = view.comment
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
Powerdesigner Name与Comment的互相转换的更多相关文章
- PowerDesigner通过SQL语句生成PDM文件并将name和comment进行互相转换
本篇文章主要介绍了PowerDesigner通过SQL语句生成PDM文件并将name和comment进行互相转换 超详细过程(图文),具有一定的参考价值,感兴趣的小伙伴们可以参考一下 1.软件准备 软 ...
- PowerDesigner中NAME和COMMENT的互相转换,需要执行语句
原文: http://www.cnblogs.com/xnxylf/p/3288718.html 由于PDM 的表中 Name 会默认=Code 所以很不方便, 所以需要将 StereoType 显示 ...
- PowerDesigner中NAME和COMMENT的互相转换
原文: http://www.cnblogs.com/yelaiju/archive/2013/04/26/3044828.html 由于PDM 的表中 Name 会默认=Code 所以很不方便, 所 ...
- 转载 - PowerDesigner(CDM—PDM—SQL脚本的转换流程)
出处: http://jbeduhai.iteye.com/blog/338579 由于图片复制上去不显示,如想看内容及图片详情,请下载附件 PowerDesigner数据模型(CDM—PDM—SQL ...
- powerdesigner 使用心得 comment、name
一.表字段设计页面设置 注意:name列填写的是中文,这样方便在视图中显示,本人忘了所以现在写下来. 二.设置PowerDesigner模型视图中数据表显示列 1.Tools-Display Pref ...
- [转]PowerDesigner表结构和字段大小写转换
原文地址:https://blog.csdn.net/u010216641/article/details/48712503 ##PowerDesigner去除双引号## 平时经常用PowerDesi ...
- 【转】PowerDesigner表结构和字段大小写转换
[转自]http://blog.csdn.net/xysh1991/article/details/8016192 使用方法:进入PowerDesigner,打开一个PDM,在菜单栏找到:Tools ...
- 双击表,powerdesigner pdm 没有 comment列(no comment)
- PowerDesigner增强
把注释显示出来 选定编辑的表,右键- >Properties- >Columns- >Customize Columns and Filter(或直接用快捷键Ctrl+U)- > ...
随机推荐
- PS 如何制作球面化文字效果
球面化文字效果图.... 00newopen-a 00newopen-b 01mew+channel 02ctrl+L 03ctrl+I 04new+wenzi 05R ...
- 删除数据库时提示数据库正在被使用,无法删除(Cannot drop database databasename because it is currently in use)的问题
删除数据库时提示数据库正在被使用,无法删除(Cannot drop database databasename because it is currently in use)的问题 删除数据库时提 ...
- MySQL自增长主键探究
MySQL自己主动增长使用的keyword是 AUTO_INCREMENT; 由于属于 DDL.所以不区分大写和小写. 使用的列,必须被定义为 key, 比方主键,唯一键等. 本文中使用的数据库是 M ...
- Android实用工具
1 json类:hiJson 格式化json字符串 2 sqlite类:sqlitespy,SQLiteExpertSetup 3
- Lambda Expression in C#
1.Expression Expression<Func<double, double>> exp = a => Math.Sin(a); 委托类型Func<dou ...
- android ListView滚动条监听判断滚动到底部还是顶部
代码: lv.setOnScrollListener(new OnScrollListener() { public void onScrollStateChanged(AbsListView vie ...
- 利用Bootstrap简单实现一个文件上传进度条
© 版权声明:本文为博主原创文章,转载请注明出处 说明: 1. 使用commons-fileupload.jar实现文件上传及进度监听 2. 使用bootstrap的进度条进行页面显示 3. 因为进度 ...
- gitlab配置smtp时,总是提示需要鉴权,记录一下爬坑过程。
配置好smtp,然后发送邮件时总是提示 Net::SMTPFatalError: 550 5.7.1 authentication is required 最后发现是因为在gitlab web界面上配 ...
- YUV Player
https://github.com/Yonsm/RawPlayer RawPlayer https://github.com/latelee/YUVPlayer YUVPlayer https:// ...
- [转载]Axure RP 7.0下载地址及安装说明
Axure RP是产品经理必备的原型制作工具,因为很多同学是新手,在这里整理一下axure7.0的下载.安装和汉化流程,希望能够帮到大家. Axure RP是美国Axure Software Solu ...