PowerDesigner显示注释comment

参考博客:https://blog.csdn.net/chao_1990/article/details/52620206

原始样式

显示操作

调出执行命令的接口

执行下列命令

1、从name替换comment

 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、从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

最终效果图如下

可以看到图1中的id列已被中文注释替换。

上述已亲测,执行命令1【从name替换comment】,显示列表中可以显示注释信息!

002--PowerDesigner显示注释comment的更多相关文章

  1. PowerDesigner设计时表显示注释选项

    PowerDesigner设计时表显示注释选项:选定编辑的表,右键- >Properties- >Columns- >Customize Columns and Filter(或直接 ...

  2. 【FPGA】always (*) 后代码全部显示注释字体的颜色之解决方法

    2015年08月26日 09:44:05 风雨也无晴 阅读数:1289    版权声明:本文为博主原创文章,未经博主允许不得转载. https://blog.csdn.net/scottly1/art ...

  3. net发布的dll方法和类显示注释信息(字段说明信息)[图解]

    自己发布的dll添加的另一个项目中突然没有字段说明信息了,给使用带来了很多的不便,原因是为了跨项目引用,所以导致不显示注释信息的,一下是解决这个问题的方法. 在要发布(被引用)的项目上右键 => ...

  4. Android Studio鼠标悬停显示注释

    Android Studio鼠标悬停显示注释 在AS中配置 如果你想从网上查看注释,到这一步就操作完成. 下面说明让软件使用本地注释: 使用本地注释 以Windows为例: 找到下面文件 C:\Use ...

  5. phpmyadmin数据表结构没有显示注释列

    新开的一个项目,用phpmyadmin作为图形化操作数据库工具.创建数据表时为其每列添加好注释,浏览数据表内容有显示注释内容,但是查看数据表结构没有显示注释列,不方便直观查看数据表每列的意思. 上网搜 ...

  6. PowerDesigner设计表时显示注释列Comment,Columns中没有Comment的解决办法

    我使用的PowerDesigner版本为16.5,如下图: 在所要编辑的表上双击,打开Table Properties窗口,并将上面的选项卡切换到Columns,如下图: 我们点击Customize ...

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

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

  8. powerDesigner 把name项添加到注释(comment)

    第一次写博客,分享一点经验吧,平时大家用powerDesigner的时候,pd是不会把name项默认添加到comment的,所以生成的数据库表里面也没有中文字段的注释. 我在网上查了一下.有解决方案了 ...

  9. powerDesigner 把name项添加到注释(comment),完美方案!

    第一次写博客,分享一点经验吧,平时大家用powerDesigner的时候,pd是不会把name项默认添加到comment的,所以生成的数据库表里面也没有中文字段的注释. 我在网上查了一下.有解决方案了 ...

随机推荐

  1. 免费申请 QQ 免费靓号

    打开网址:https://ssl.zc.qq.com/v3/index-chs.html?type=3 说明:靓号一般分为 9位靓号 or 带有寓意的号码 激活规则:获取的"靓号" ...

  2. flockfile, ftrylockfile, funlockfile - 为标准输入输出锁定文件 FILE

    SYNOPSIS 总览 #include <stdio.h> void flockfile(FILE *filehandle); int ftrylockfile(FILE *fileha ...

  3. raft协议-分布式环境下的数据一致性问题

    阅读了一个有意思的ppt,是Standford大学发表的raft协议 网址:http://thesecretlivesofdata.com/raft/ 下面自己总结下咯: 1.raft是一个实现了解决 ...

  4. 2019 计蒜之道 初赛 第二场 A 百度AI小课堂-矩阵问题 ( 等差数列求和公式)

    题目背景 ​91029102 年 99 月 11 日,百度在 X 市 XX 中学举办了一场 AI 知识小课堂,本场 AI 知识小课堂老师教授了一些矩阵的相关知识,因为矩阵在 AI 人工智能中也有相当的 ...

  5. ZX树初步

    一些数据结构,比如线段树或平衡树,他们一般是要么维护每个元素在原序列中的排列顺序,要么是维护每个元素的大小顺序,若是像二者兼得那么就想想主席树. 给你多个不同的数字问你1-N第K大的数是多少 最简单的 ...

  6. 特殊字符(包括emoji)梳理和UTF8编码解码原理(转)

    转自:https://www.jianshu.com/p/57c27d67a8a8 背景知识 emoji表情符号,是20世纪90年代由NTT Docomo栗田穣崇(Shigetaka Kurit)创建 ...

  7. python time、datetime模块

    时间的三种格式:1)时间戳 2)格式化的时间字符串 3)元组(struct_time):time.struct_time(tm_year=1970, tm_mon=5, tm_mday=23, tm_ ...

  8. ubuntu 16.04 安装后需要做的事情

    1. 更改软件源 sudo gedit /etc/apt/source.list 在底部加入:(如果可以,把Ubuntu官方源注释掉“#_____”) # deb cdrom:[Ubuntu 16.0 ...

  9. python字典总结

    今天总结一篇关于字典的知识点> 字典也是python提供的一种常用的数据结构,它用于存放具有映射关系的数据 比如成绩表,语文:34,数学:99,如果单纯的使用两个列表保存这组数据,则无法记录两组 ...

  10. L5 Swagger 使用说明

    网上看了看,关于这个扩展介绍很少.今天工作恰好用到,研究了一下,觉得有必要分享一下. 一.  简介: 这个包是Swagger-php和Swagger-ui的封装,适用于Laravel5. 二.版本要求 ...