在 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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

随机推荐

  1. day 6 - 1 知识点小节

    python2 与 python3 的区别 1. print.input.生成器 #python2 print() print 'abc' range() xrange() 生成器 raw_input ...

  2. RabbitMQ远程执行任务RPC。

    如果想发一条命令给远程机器,再把结果返回 这种模式叫RPC:远程过程调用 发送方将发送的消息放在一个queue里,由接收方取. 接收方再把执行结果放在另外一个queue里,由发送方取 实际上,发送方把 ...

  3. Spring Boot 学习之路二 配置文件 application.yml

    一.创建配置文件 如图所示,我们在resources文件夹中新建配置文件application.yml   结构图 二.一些基本配置 server: port: 8090 //配置端口 session ...

  4. c++面经积累<2>

    4.类成员初始化方式:列表初始化和赋值初始化 赋值初始化通过在函数体内进行赋值,列表初始化,在构造函数后面加上冒号,使用初始化列表进行初始化.在函数体内进行初始化,是在所有的数据成员被分配内存空间后进 ...

  5. 基于密度峰值的聚类(DPCA)

    1.背景介绍 密度峰值算法(Clustering by fast search and find of density peaks)由Alex Rodriguez和Alessandro Laio于20 ...

  6. 一篇博客带你入门Flask

    一. Python 现阶段三大主流Web框架 Django Tornado Flask 对比 1.Django 主要特点是大而全,集成了很多组件,例如: Models Admin Form 等等, 不 ...

  7. Educational Codeforces Round 62 (Rated for Div. 2) - C Playlist

    当时题意看错了...不过大致思路是对的,唯一没有想到的就是用优先队列搞这个东西,真是不该啊... 题意大概就是,有N首歌,N首歌有两个东西,一个是长度Ti,一个是美丽值Bi,你最多可以选择K首歌, 这 ...

  8. Sql Server登录失败问题

    1.启动SQL Server 2008 Management Studio,会看到 2. 里面有一个 身份验证.这个 身份验证 的下拉列表里面有两个选项: Windows 身份验证 和 SQL Ser ...

  9. Tomcat服务器下载、安装、配置环境变量教程(超详细)

    请先配置安装好Java的环境,若没有安装,请参照我以下的步骤进行安装! 请先配置安装好Java的环境,若没有安装,请参照我以下的步骤进行安装! 请先配置安装好Java的环境,若没有安装,请参照我以下上 ...

  10. Flutter之List

    void listDemo() { // 1.list的创建 listCreate(); // 2.多种类型的输出 listPrint(); // 3.添加数据 listAddElement(); / ...