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

  1. '******************************************************************************
  2. '* File: name2comment.vbs
  3. '* Title: Name to Comment Conversion
  4. '* Model: Physical Data Model
  5. '* Objects: Table, Column, View
  6. '* Author: steveguoshao
  7. '* Created: 2013-11-29
  8. '* Mod By:
  9. '* Modified:
  10. '* Version: 1.0
  11. '* Memo: Modify from name2code.vbs
  12. '******************************************************************************
  13.  
  14. Option Explicit
  15. ValidationMode = True
  16. InteractiveMode = im_Batch
  17.  
  18. Dim mdl ' the current model
  19.  
  20. ' get the current active model
  21. Set mdl = ActiveModel
  22. If (mdl Is Nothing) Then
  23. MsgBox "There is no current Model "
  24. ElseIf Not mdl.IsKindOf(PdPDM.cls_Model) Then
  25. MsgBox "The current model is not an Physical Data model. "
  26. Else
  27. ProcessFolder mdl
  28. End If
  29.  
  30. ' This routine copy name into comment for each table, each column and each view
  31. ' of the current folder
  32. Private sub ProcessFolder(folder)
  33. Dim Tab 'running table
  34. for each Tab in folder.tables
  35. if not tab.isShortcut then
  36. tab.comment = tab.name
  37. Dim col ' running column
  38. for each col in tab.columns
  39. col.comment= col.name
  40. next
  41. end if
  42. next
  43.  
  44. Dim view 'running view
  45. for each view in folder.Views
  46. if not view.isShortcut then
  47. view.comment = view.name
  48. end if
  49. next
  50.  
  51. ' go into the sub-packages
  52. Dim f ' running folder
  53. For Each f In folder.Packages
  54. if not f.IsShortcut then
  55. ProcessFolder f
  56. end if
  57. Next
  58. 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. Python与Mysql交互

    #转载请联系 在写内容之前,先放一张图,bling- 这张图算是比较详细的表达出了web开发都需要什么.用户访问网页,就是访问服务器的网页文件.这些网页文件由前端工程师编写的.服务器通常用nginx/ ...

  2. Selenium2+python自动化51-unittest简介【转载】

    前言 熟悉java的应该都清楚常见的单元测试框架Junit和TestNG,这个招聘的需求上也是经常见到的.python里面也有单元测试框架-unittest,相当于是一个python版的junit. ...

  3. Selenium2+python自动化27-查看selenium API【转载】

    前言 前面都是点点滴滴的介绍selenium的一些api使用方法,那么selenium的api到底有多少呢?本篇就叫大家如何去查看selenium api,不求人,无需伸手找人要,在自己电脑就有. p ...

  4. java中Math.abs(-2147483648)的返回值应该是什么?

    我觉得这是一个非常有意思的问题,Math.abs(-2147483648)的返回值应该是什么? java计算结果 为什么没有得到正数结果呢? 首先我们先看下java区分整数正负的原理.在二进制的情况下 ...

  5. eclispe启动进入子项目的解决

    问题描述: In Package Explorer I right-clicked on project and selected "Open in New Window". Ne ...

  6. 服务端指南 数据存储篇 | 聊聊 Redis 使用场景(转)

    作者:梁桂钊 本文,是升级版,补充部分实战案例.梳理几个场景下利用 Redis 的特性可以大大提高效率. 随着数据量的增长,MySQL 已经满足不了大型互联网类应用的需求.因此,Redis 基于内存存 ...

  7. Mysql错误:Every derived table must have its own alias

    Mysql报错:Every derived table must have its own alias    <缺少一个别名> 在子查询中经常会犯的错误 .这个别名其实没啥用途....  ...

  8. python提纲

    根据网上专栏整理提纲 1.模块介绍 2.time&datetime模块 3.random模块 4.os模块 5.sys模块 6.json&pickle模块 7.logging模块 8. ...

  9. Appium +Python 连接真机测试

    1.数据线连接电脑和手机: 2.用adb获取手机的UUID:cmd-> adb devices 前面的就是你手机的UUID 3.打开appium,选择手机的安卓版本(关于手机中查看),填写手机的 ...

  10. centos6.5 安装stardict 出现问题 [Errno 256] No more mirrors to try

    1. 下载startdict #wget http://downloads.naulinux.ru/pub/NauLinux/6x/i386/sites/School/RPMS/stardict-3. ...