原因:这两个字段的值很多时候其实是一样的,重写很麻烦

步骤:打开菜单Tools>Execute Commands>Edit/Run Script.. 或者用快捷键 Ctrl+Shift+X。将下面的语句粘贴进去并执行

VBS脚本:

'代码一:将Name中的字符COPY至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

————————————————————————————————————————

'代码二:将Comment中的字符COPY至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,PowerDesigner 把Comment复制到name中和把name复制到Comment - 专注、坚持 - 博客园
https://www.cnblogs.com/xiaotao726/p/6841811.html

【PowerDesigner】【8】把Comment复制到name中和把name复制到Comment的更多相关文章

  1. PowerDesigner 把Comment复制到name中和把name复制到Comment

    在使用PowerDesigner对数据库进行概念模型和物理模型设计时,一般在NAME或Comment中写中文,在Code中写英文.Name用来显 示,Code在代码中使用,但Comment中的文字会保 ...

  2. MySQL高可用之组复制(4):详细分析组复制理论

    MySQL组复制系列文章: MySQL组复制大纲 MySQL组复制(1):组复制技术简介 MySQL组复制(2):配置单主模型的组复制 MySQL组复制(3):配置多主模型的组复制 MySQL组复制( ...

  3. mysql同步复制异常的常见操作-传统复制方式

    mysql同步复制异常的常见操作-传统复制方式 一.传统复制方式是基于非gtid的,常见的错误有1032和1062 1032是主键冲突,1062是从库中没有找到对应的记录. 可以查看出现错误的binl ...

  4. 一文带你了解js数据储存及深复制(深拷贝)与浅复制(浅拷贝)

    背景 在日常开发中,偶尔会遇到需要复制对象的情况,需要进行对象的复制. 由于现在流行标题党,所以,一文带你了解js数据储存及深复制(深拷贝)与浅复制(浅拷贝) 理解 首先就需要理解 js 中的数据类型 ...

  5. MySQL复制(三) --- 高可用性和复制

    实现高可用性的原则很简单: 冗余(Redundancy):如果一个组件出现故障,必须有一个备用组件.这个备用组件可以是standing by的,也可以是当前系统部署中的一部分. 应急计划(Contig ...

  6. 大批量复制Oracle数据表,连带复制主键约束,字段说明以及字段默认值(量产)

    DECLARE      CURSOR tab_name_cur       IS           SELECT table_name           FROM user_tables     ...

  7. java hasmap对象的深复制实现:字节码复制和对象序列化成字符串复制比较。

    /** * Created by Administrator on 2016/11/23. */ public class test { public static void main(String[ ...

  8. Mysql5.7多源复制,过滤复制一段时间后增加复制一个库的实现方法

    多源复制如果是整个实例级别的复制,那不存在下面描述的情况. 如果是对其中一个或多个主实例都是过滤复制,并且运行一段时间后,想在这个源上再增加一个库怎么实现?   主1:192.168.1.10 330 ...

  9. 复制粘贴引发的鸠占鹊巢——IDEA复制项目导致sources root复用了另一个项目

    复制粘贴大法一向是程序猿的利器,但有时也会引发一些拎不清的麻烦关系来.比如我们现在想新建一个项目,为了快速而对原来的uis-gateway动用了复制粘贴大法,然后改改项目名就成了uis-applica ...

随机推荐

  1. P4363 [九省联考2018]一双木棋chess

    思路 容易发现只能在轮廓线的拐点处落子,所以棋盘的状态可以用一个n+m长度的二进制数表示 转移就是10变成01 代码 #include <cstdio> #include <algo ...

  2. [HDU] 平方和与立方和

    题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2007 //坑:注意判断输入两个数的前后大小关系 // 用while 循环 #include<io ...

  3. [转载]error while loading shared libraries的解決方法

    转自:https://blog.csdn.net/dumeifang/article/details/2963223 error while loading shared libraries的解決方法 ...

  4. 2、Keepalived提供日志与双主模型演示

    Keepalived实例演示: 利用keepalived流动一个VIP,在提供LVS的高可用以及实现对LVS后端的real server做健康状态检测,最后实现高可用nginx.   HA Clust ...

  5. hihoCoder 1145 幻想乡的日常(树状数组 + 离线处理)

    http://hihocoder.com/problemset/problem/1145?sid=1244164 题意: 幻想乡一共有n处居所,编号从1到n.这些居所被n-1条边连起来,形成了一个树形 ...

  6. 1.Jenkins 在windows下的安装与配置

    1. 安装Jenkins 1.war包安装:启动Jenkins命令,打开cmd至Jenkins安装目录下,运行命令 java -jar jenkins.war 如果改变默认端口,则指定端口例如端口号1 ...

  7. 测试驱动android

    测试驱动android开发 在安卓模拟器或者真机上跑测试用例速度很慢.构建.部署.启动app,通常需要花费一分钟或者更久.这不是TDD(测试驱动开发)模式.Robolectric提供一种更好的方式. ...

  8. 简单Promise回顾

    1:传统的CallBack回调函数let ajax=function(callback){ //dosomething this.setTimeout(()=>{ callback&&a ...

  9. Intellij Idea修改css文件即时更新生成效果

    用来Idea也有一段时间了,觉得还是有很多地方没有用到,今天遇到了一个问题,百度了解决方法,正好在这里做一个小记录 主要问题是我在idea的项目里面修改了css文件,然后运行web文件,发现并没有做到 ...

  10. 【二十九】php之简易微信二维码支付

    参考二维码支付接口文档:https://pay.weixin.qq.com/wiki/doc/api/native.php?chapter=6_5 index.php <!DOCTYPE htm ...