PowerDesigner中使用方法为:

    PowerDesigner->Tools->Execute Commands->Edit/Run Scripts

  代码一:将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

PowerDesigner 同步Name到Comment 及 同步 Comment 到Name的更多相关文章

  1. pdm文件name与comment互相同步

    1.使用Powerdesigner工具将pdm文件的name同步至comment. 点击Tools->Execute Commands->Edit/Run Scripts 输入脚本: Op ...

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

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

  3. Rsync同步、Rsync+Lsync实时同步

    Rsync同步.Rsync+Lsync实时同步 原创博文http://www.cnblogs.com/elvi/p/7658049.html #!/bin/sh #Myde by Elven @ #c ...

  4. PowerDesin把name复制到Comment,把Comment复制到Name

    PowerDesin把name复制到Comment,把Comment复制到Name的方法: PowerDesigner->Tools->Execute Commands->Edit/ ...

  5. mongosync同步1,oplog同步会读取其他集合同步

    使用mongosync同步数据     注意: 我下面的这个mongodb版本较低(3.2.16), 还可以用这个工具来同步数据.工具不支持更高版本的mongodb了. 使用方法: https://g ...

  6. 使用BestSync同步软件与坚果云同步

    坚果云的免费用户可以享受每个月的1G上传与3G下载流量,同时号称是国内唯一支持WebDAV的云.我的工作备份的文档不多,正好手头有BestSync同步软件可以用.决定试试BestSync的与WebDA ...

  7. js中ajax连接服务器open函数的另外两个默认参数get请求和默认异步(open的post方式send函数带参数)(post请求和get请求区别:get:快、简单 post:安全,量大,不缓存)(服务器同步和异步区别:同步:等待服务器响应当中浏览器不能做别的事情)(ajax和jquery一起用的)

    js中ajax连接服务器open函数的另外两个默认参数get请求和默认异步(open的post方式send函数带参数)(post请求和get请求区别:get:快.简单 post:安全,量大,不缓存)( ...

  8. 从同步原语看非阻塞同步以及Java中的应用

    非阻塞同步:基于冲突检测的乐观并发策略,通俗讲就是先进行操作,如果没有其他线程争用共享数据,那操作就成功了,如果争用数据有冲突那就采用其他的补偿措施(最常见的就是不断重试直到成功),这种乐观的并发策略 ...

  9. 使用SyncNavigator轻松实现数据库异地同步、断点续传、异构同步

    原文地址:https://blog.csdn.net/liushuijinger/article/details/7704410/ 最近一直在研究数据库同步的问题,在网上查了很多资料,也请教了很多人, ...

  10. mysql半同步复制跟无损半同步区别

    mysql半同步复制跟无损半同步复制的区别: 无损复制其实就是对semi sync增加了rpl_semi_sync_master_wait_point参数,来控制半同步模式下主库在返回给会话事务成功之 ...

随机推荐

  1. WAS启动报错Service failed to start. startServer return code = -1

    http://www-01.ibm.com/support/docview.wss?uid=swg21368020 Problem(Abstract) Attempts to start IBM We ...

  2. Linux 用户与用户组管理

    Linux 是一个多用户多任务的分是操作系统,用户是实现操作系统资源分配,同时也是安全权限模型的核 心要素之一:用户组是一个容纳很多用户的容器,可以分配权限组,进一步优化了权限分配. 一.用户管理 用 ...

  3. VS 调试 无法启动IIS Express Web 服务器(进程不存在)

    拷贝VS2015项目 出现无法启动IIS Express Web 服务器 一.把你们拷贝刀本机的解决方案文件中的隐藏文件夹.vs删除掉 重新生产解决方案就可以启动iis express了.

  4. C# 当前目录你了解多少

    C#中获取程序运行的当前目录的方法有多种,本文为大家提供三种方式,并作简单分析,有需要的朋友,可以参考下. 在C#中,有很多方式可以获取程序运行的当前目录,常见的方式有: .string strPat ...

  5. tp5的学习

    1.安装,官网下载 2.访问配置:http://localhost/App/public/ 3.入口文件,项目目录/public // 定义应用目录 define('APP_PATH', __DIR_ ...

  6. PHP和Apache结合 Apache默认虚拟主机

  7. ubuntu下安装和配置apache2+SVN的详细方法介绍

    ubuntu安装和配置SVN第一步:安装apache2  libapache2-svn subversionsudo apt-get install apache2sudo apt-get insta ...

  8. vi编辑器的使用方式

    vi编辑器是所有Unix及Linux系统下标准的编辑器,它的强大不逊色于任何最新的文本编辑器,这里只是简单地介绍一下它的用法和一小部分指令.由于对Unix及Linux系统的任何版本,vi编辑器是完全相 ...

  9. nvm安装node和npm,个人踩坑记录

    我采用nvm-setup安装windows版本的nvm nvm安装node出现的问题: 1.node成功了,npm没成功 解决:在nvm 安装了node之后,输入npm找不到该命令,当时安装报错如下: ...

  10. 6. go数组与冒泡排序

    include 数组的概念 如何定义数组 数组常用的用法 数组如何指定下标设值 二维数组 冒泡排序 数组 定义数组的格式:var [n] , n>=0 数组长度也是类型的一部分,因此具有不同的长 ...