1。首先copy以下的vbs脚本。并将其另存为name2comment.vbs

'******************************************************************************
'* File: name2comment.vbs
'* Title: Name to Comment Conversion
'* Model: Physical Data Model
'* Objects: Table, Column, View
'* Author: steveguoshao
'* Created: 2013-11-29
'* Mod By:
'* Modified:
'* Version: 1.0
'* Memo: Modify from name2code.vbs
'****************************************************************************** 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
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 的选择以下的菜单

watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvam9leW9uMTk4NQ==/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/SouthEast" alt="">

3,然后选择name2comment.vbs文件,run就可以

PowerDesigner 将表的字段name属性设置到comment凝视的更多相关文章

  1. 不允许修改SQLserver2008r2表中字段的属性问题

    SQLserver2008r2修改表中字段的属性时弹出 点击工具->选项,取消阻止保存要求重新创建表的更改

  2. Mysql 整数类型的字段的属性设置及常用的函数

    数据类型 二.MySQL支持的数据类型 数值类型.日期类型.字符串类型 1.数值类型 1)整数类型 tinyint.smallint.mediumint.int和bigint 2)zerofill属性 ...

  3. powerdesigner 将表中name列值复制到comment列 (保留原有comment)

    /** * PowerDesigner里面将表中name列值复制到comment列 * @see --------------------------------------------------- ...

  4. EF中多表公共字段,以及设置EntityBase使所有实体类继承自定义类

    使用EF框架访问数据库时,如果某些表具有公共字段,例如在审核流程中,对于各类申请单资料的创建人.创建时间.修改人.修改时间,这些可能多表都需要的字段,如果在每个实体中进行赋值操作显然是类似和重复的,下 ...

  5. mysql给一张表新增字段,并设置该字段为外键

    首先给usercategory表新增libraryid字段: alter table usercategory add libraryid varchar(50) 修改picturelibrary表的 ...

  6. PowerDesigner跟表的字段加注释

    选择那个表 右键- >Properties- >Columns- >Customize Columns and Filter(或直接用快捷键Ctrl+U)- >Comment( ...

  7. mysql修改表、字段、库的字符集(转)

    原文链接:http://fatkun.com/2011/05/mysql-alter-charset.html MySQL中默认字符集的设置有四级:服务器级,数据库级,表级 .最终是字段级 的字符集设 ...

  8. Oracle | 给表和字段添加注释

    comment  on  column  表名.字段名   is  '注释内容'; comment on column OPERATOR_INFO.MAIN_OPER_ID is '归属操作员'; c ...

  9. .NET开源工作流RoadFlow-表单设计-新建表单(属性设置)

    点击表单设计工具栏上的 新建表单 按钮会弹出新表单属性设置框: 表单名称:新表单表名称. 数据连接:表单对应的数据库连接(此连接在 系统管理-->数据库连接 中维护). 数据表:表单对应的数据库 ...

随机推荐

  1. 在什么情况下Java比C++快?

    转载   http://www.importnew.com/16056.html

  2. docker从零开始(五)堆栈初体验,stacks

    先决条件 安装Docker 1.13或更高版本. 获取Docker Compose,请参考第三节 按照第四节中的描述获取Docker Machine. 在第二节中了解如何创建容器. 确保您的图像作为已 ...

  3. PEP 3106 -- Revamping(改进) dict.keys(), .values() and .items()

    1. Abstract(摘要) This PEP proposes(建议) to change the .keys(), .values() and .items() methods of the b ...

  4. AC日记——[ZJOI2007]报表统计 bzoj 1058

    1058 思路: 平衡树的题: 然而我的平衡树写一次炸一次QwQ: 而且各种tle: 所以stl水过: 代码: #include <set> #include <cstdio> ...

  5. [xampp] phpmyadmin 设置登录密码

    $ cd /opt/lampp/bin $ ./mysqladmin -u root password 'new_password' $ vim ../phpmyadmin/config.inc.ph ...

  6. [转]认识session

    今天想用一个session来实现用户登录判断,也算是对之前session的探究,查了下资料session的运行机制如下: session是服务器端的一种会话机制,当客户端的请求服务器创建一个sessi ...

  7. HDU 6356.Glad You Came-线段树(区间更新+剪枝) (2018 Multi-University Training Contest 5 1007)

    6356.Glad You Came 题意就是给你一个随机生成函数,然后从随机函数里确定查询的左右区间以及要更新的val值.然后最后求一下异或和就可以了. 线段树,区间最大值和最小值维护一下,因为数据 ...

  8. The 15th Zhejiang Provincial Collegiate Programming Contest Sponsored by TuSimple - J CONTINUE...?

    CONTINUE...? Time Limit: 1 Second      Memory Limit: 65536 KB      Special Judge DreamGrid has  clas ...

  9. 25、Django实战第25天:讲师详情页

    1.复制teacher-detail.html到templates目录下 2.编辑teacher-detail.html,继承base.html 3.编辑organization.view.py cl ...

  10. [CF494C]Helping People

    题意:有$n$个穷人,每个穷人有$a_i$的钱,有一个富人决定做$q$次捐赠$(l_i,r_i,p_i)$,表示他有$p_i$的概率给$[l_i,r_i]$的人捐$1$的钱,捐赠的价值为捐赠后最富的人 ...