从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

从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

PowerDesigner Comment与Name相互替换的更多相关文章

  1. VB6.0中,DTPicker日期、时间控件不允许为空时,采用文本框与日期、时间控件相互替换赋值(解决方案)

    VB6.0中,日期.时间控件不允许为空时,采用文本框与日期.时间控件相互替换赋值,或许是一个不错的选择. 实现效果如下图: 文本框txtStopTime1 时间框DTStopTime1(DTPicke ...

  2. Word 中直引号和弯引号的相互替换

    直引号替换成弯引号 弯引号替换成直引号 未完 ...... 点击访问原文(进入后根据右侧标签,快速定位到本文)

  3. js 单引号和双引号相互替换的实现方法

    1.双引号替换成单引号 var domo = JSON.stringify(address).replace(/\"/g,"'"); var a = {a:1,b:2}; ...

  4. PowerDesigner 常用配置修改

    PowerDesigner中Name与Code同步的问题 转自:http://blog.sina.com.cn/u/48932504010005t9 PowerDesigner中,但修改了某个字段的n ...

  5. Notepad++快捷键&正则表达式替换字符串&插件

    Notepad++绝对是windows下进行程序编辑的神器之一,要更快速的使用以媲美VIM,必须灵活掌握它的快捷键,下面对notepad++默认的快捷键做个整理(其中有颜色的为常用招数): 1. 文件 ...

  6. nodpad++正则替换

    则表达式是一个查询的字符串,它包含一般的字符和一些特殊的字符,特殊字符可以扩展查找字符串的能力,正则表达式在查找和替换字符串的作用不可忽视,它 能很好提高工作效率. EditPlus的查找,替换,文件 ...

  7. notepad++正则表达式替换字符串详解

    正则表达式是一个查询的字符串,它包含一般的字符和一些特殊的字符,特殊字符可以扩展查找字符串的能力,正则表达式在查找和替换字符串的作用不可忽视,它 能很好提高工作效率. EditPlus的查找,替换,文 ...

  8. Lua 5.1 参考手册

    Lua 5.1 参考手册 by Roberto Ierusalimschy, Luiz Henrique de Figueiredo, Waldemar Celes 云风 译 www.codingno ...

  9. Angularjs之directive指令学习笔记(二)

    1.Directive的五个实例知道driective作用.其中字段restrict.template. replace.transclude.link用法 参考文章链接地址:http://damoq ...

随机推荐

  1. 神奇的make自动生成include file的功能

    嗯,今天研究公司makefile的代码,始终搞不明白有一段下载编译依赖的rule recipe(对这个名词不了解请参考make的官方文档)是怎么执行的.明明在执行的时候并指定的target并没有依赖那 ...

  2. interrupt 1 using 1

    释疑:void Timer0() interrupt 1 using 1 Timer0   是函数名,随便取的 interrupt   xx   using   y 跟在interrupt   后面的 ...

  3. swagger报No operations defined in spec!

    突然发现项目的swagger报No operations defined in spec! SWAGGER_SCAN_BASE_PACKAGE 路径改变了! package com.redis.con ...

  4. jsp出现getOutputStream() has already been called for this response异常的原因和解决方法

    jsp出现getOutputStream() has already been called for this response异常的原因和解决方法 在tomcat5下jsp中出现此错误一般都是在js ...

  5. VUE,使用物理引擎Box2D设计类愤怒小鸟的击球游戏--基本架构设置

  6. cf499B-Lecture 【map】

    http://codeforces.com/problemset/problem/499/B B. Lecture     You have a new professor of graph theo ...

  7. html学习代码

    <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding= ...

  8. 【HDU3853】LOOPS

    题意 有一个R*C的方格.一个人想从(1,1)走到(r,c).在每个格子都有三种选择,向下,向右,或者原地不动.每个格子里的每个选择都有一定的概率.而每次移动都需要消耗2点的能量,问期望消耗的能量是多 ...

  9. Stars URAL - 1028

    就是给你一些星星的坐标,然后求出每个星星的左下角有多少颗星星 题目保证按照Y坐标的顺序给出每个星星的坐标,那么我们就可以说,当输入某个星星的坐标时,此时有多少个星星的横坐标小于它,它左下角就有多少星星 ...

  10. 远程连接MySQL数据库报错:is not allowed to connect to this MYSQL server的解决办法

    1. 改表法. 可能是你的帐号不允许从远程登陆,只能在localhost.这个时候只要在localhost的那台电脑,登入MySQL后,更改 "mysql" 数据库里的 " ...