Tools -> Execute Commands -> Edit/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 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
'把表明作为表注释,其实不用这么做
tab.comment = tab.name
Dim col ' running column
for each col in tab.columns
'把列name和comment合并为comment
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

PowerDesigner列名作为注释的更多相关文章

  1. PowerDesigner列名、注释内容互换

    资料来源:PowerDesigner列名.注释内容互换 文中一共提供了2种操作的代码. (1)将Name中的字符COPY至Comment中 (2)将Comment中的字符COPY至Name中 使用方法 ...

  2. powerdesigner 字段添加注释和默认值

    powerdesigner 字段添加注释和默认值 2017年01月06日 10:59:02 qingzhuoran 阅读数:27161更多 个人分类: powerdesigner   1.选中表,右键 ...

  3. 如何将sql查询出的列名用注释代替?

    如何将sql查询出的列名用注释代替? 大家正常的工作的时候,会有这样的要求,客户想要看下原始数据,但是呢.前台导出又麻烦,这时候只能从数据库拷贝出来一份.但是呢,数据库里面的字段客户又看不明白,只能用 ...

  4. PowerDesigner显示Common注释列并自动赋值

    PowerDesigner中默认不显示Common注释列,可根据以下步骤显示并紫东填充Name列内容. 1.显示Common注释列 2.运行VB Script脚本自动赋值 使用Shift+Ctrl+X ...

  5. PowerDesigner添加表注释

    之前同事用PowerDesigner 建立数据模型后,生成到数据库中,没有注释.这导致数据库使用起来不是很方便,特别是对数据表结构不熟悉的同事. 其实,可以添加注释(并且可以逆向,即从数据库中反向更新 ...

  6. 解决PowerDesigner 反向工程没有注释(备注)

    1. 列注释 原来代码: {OWNER, TABLE, S, COLUMN, DTTPCODE, LENGTH, SIZE, PREC, COMPUTE, NOTNULL, IDENTITY, DOM ...

  7. 解决PowerDesigner 反向工程没有注释(备注)

    本文转载自:http://www.cnblogs.com/zhangxb/archive/2012/04/20/2458898.html 1. 列注释 原来代码: {OWNER, TABLE, S, ...

  8. PowerDesigner 中将Comment(注释)及Name(名称)内容互相COPY的VBS代码

    在用PowerDesigner时.常常在NAME或Comment中写中文在Code中写英文.Name只会显示给我们看,Code会使用在代码中.但Comment中的文字会保存到数据库TABLE的Desc ...

  9. powerdesigner mysql逆向工程注释不显示问题

随机推荐

  1. 【MySQL】MySQL统计NULL字段处理

    select A.user_id,ifnull(sum(ifnull(A.ex_cpu,0)),0) AS a0, ifnull(sum(ifnull(A.ex_mem,0)),0) AS a1, i ...

  2. rsync同步数据---把左边的文件全部拷贝到右边

    背景,配置好了ssh 使用rsa pulbic key的方式登陆远程服务器.//ssh-keygen -t rsa -b 2048 -f andy-rsync-key -P '' https://he ...

  3. c语言基础,\r, \n, \r\n

    Enumeration (or enum) in C Enumeration (or enum) is a user defined data type in C. It is mainly used ...

  4. python 初步学习

    疑惑1:windows下的python  如何设置显示汉字 推荐几个学习网址,也方便自己以后查看: http://pmghong.blog.51cto.com/3221425/d-10 www.w3c ...

  5. 实现基于DNS的负载均衡

    转自:http://blog.sina.com.cn/s/blog_4e424e2101000c3g.html 如果你有一个很受欢迎的Web站点,你会发现当请求的连接数增加时,服务器的响应延时也会随之 ...

  6. 隐马尔可夫模型HMM与维特比Veterbi算法(二)

    隐马尔可夫模型HMM与维特比Veterbi算法(二) 主要内容: 前向算法(Forward Algorithm) 穷举搜索( Exhaustive search for solution) 使用递归降 ...

  7. PHPCMS增加投票选项代码

    <script src="jquery-1.10.1.js"></script> <tr> <th width="20%&quo ...

  8. C#.NET常见问题(FAQ)-使用SharpDevelop开发 如何在项目中添加类文件

    点击文件-新建-文件,然后再工程内创建文件   或者工程-添加-新建项     更多教学视频和资料下载,欢迎关注以下信息: 我的优酷空间: http://i.youku.com/acetaohai12 ...

  9. C# 单元测试几个方法的用法

    单元测试的基本方法是调用被测代码的函数,输入函数的参数值,获取返回结果,然后与预期测试结果进行比较,如果相等则认为测试通过,否则认为测试不通过. 1.Assert类的使用 Assert.Inconcl ...

  10. Java从零开始学二十五(枚举定义和简单使用)

    一.枚举 枚举是指由一组固定的常量组成的类型,表示特定的数据集合,只是在这个数据集合定义时,所有可能的值都是已知的. 枚举常量的名称建议大写. 枚举常量就是枚举的静态字段,枚举常量之间使用逗号隔开. ...