PowerDesigner中翻转生成PDM图时把Name属性变成注释(转)
在pd里面运行下面这段代码
'******************************************************************************
'* File: name2comment.vbs
'* Purpose: Database generation cannot use object names anymore
' in version 7 and above.
' It always uses the object codes.
'
' In case the object codes are not aligned with your
' object names in your model, this script will copy
' the object Name onto the object comment for
' the Tables and Columns.
'
'* Title: 把对象name拷入comment属性中
'* Version: 1.0
'* 执行方法:PD11 -- Open PDM -- Tools -- Execute Commands -- Run Script
'******************************************************************************
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 code 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
if tab.comment ="" then
else
tab.name=tab.name+"("+tab.comment+")"
on error resume next
end if
Dim col ' running column
for each col in tab.columns
if col.comment="" then
' MsgBox "表"+tab.name+"列"+col.name +"没有comment"
else
col.name=col.name+"("+col.comment+")"
on error resume next
end if
next
end if
next
Dim view 'running view
for each view in folder.Views
if not view.isShortcut then
if view.comment="" then
MsgBox "视图"+view.name +"没有comment"
else
view.name=view.name+"("+view.comment+")"
on error resume next
end if
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中翻转生成PDM图时把Name属性变成注释(转)的更多相关文章
- idea 中如何生成类图
前言:记录一下 idea 中如何生成类图,毕竟类图在开发或看源码时用得特别多. 推荐博客:https://blog.csdn.net/zhangle1hao/article/details/78804 ...
- chart.js插件生成折线图时数据普遍较大时Y轴数据不从0开始的解决办法[bubuko.com]
chart.js插件生成折线图时数据普遍较大时Y轴数据不从0开始的解决办法,原文:http://bubuko.com/infodetail-328671.html 默认情况下如下图 Y轴并不是从0开始 ...
- PowerDesigner中在生成的数据库脚本中用name列替换comment列作为字段描述的方法
1 PowerDesigner中在生成的数据库脚本中用name列替换comment列作为字段描述的方法如下, 依次打开Tools -- Execute Commands -- Run Script,运 ...
- 在PowerDesigner中自动生成sqlserver字段备注
在PowerDesigner中自动生成sqlserver字段备注 PowerDesigner是数据库设计人员常用的设计工具,但其自生默认生成的代码并不会生成sqlserver数据库的字段备注说明.在生 ...
- Eclipse中自动生成get/set时携带注释给get/set
Eclipse中自动生成get/set时携带注释给get/set 编码的时候通常要用到 JavaBean ,而在我们经常把注释写在字段上面,但生成的Get/Set方法不会生成,通过修改Eclips ...
- PowerDesigner中CDM和PDM如何定义外键关系
有A.B两张表(实体),各自有id作为主键,两表是一一对应关系.但略有不同: A表一条记录可以对应0或1条B表记录,B表一条记录必须对应唯一条A表记录. 这样的关系如何在CDM或PDM中定义? 在最后 ...
- Yarn中如何生成状态机图
原文 http://xiguada.org/yarn_state_picture/ 在Hadoop2.0系列的版本里,采用了状态机的方式处理ResourceManager,NodeManager,Ma ...
- PowerDesigner中如何生成主键和自增列
1.SQL Server版本: 第一步,首先要建立与数据库的连接,方法较多,这里举个例子: http://www.cnblogs.com/netsql/archive/2010/05/17/17375 ...
- C#中如何生成矢量图
主要的功能就是使用C#画矢量图,然后导出到Word.Excel.Powerpoint中,并且能够再次被编辑.以下是解决过程: 首先应该确定在Office文档中可编辑图形使用的格式:学习了相关资料,了解 ...
随机推荐
- FR共轭梯度法 matlab
% FR共轭梯度法 function sixge x0=[1,0]'; [x,val,k]=frcg('fun','gfun',x0) end function f=fun(x) f=100*(x(1 ...
- DoraHacks的笔记
DoraHacks的笔记
- 构造个人轻量级XSS平台获取管理员cookie并登录
一.前言 本平台是个人轻量级XSS测试平台,仅作为练习参考. 二.实验环境 服务器操作系统:Centos 7 Web容器:Apache 三.平台搭建过程 安装Apache 安装PHP 安装Git工具 ...
- mac osx 升级到10.10 软件无法打开的问题
osx升级到10.9.5 和10.10后,很多软件出现无法打开的问题, This patch seems to be corrupted.Please make sure you get your p ...
- python -wordcloudan云词安装
1安装网站:https://download.lfd.uci.edu/pythonlibs/u2yrk7ps/wordcloud-1.4.1-cp36-cp36m-win_amd64.whl 2安装过 ...
- 缓冲区溢出基础实践(一)——shellcode 与 ret2libc
最近结合软件安全课程上学习的理论知识和网络资料,对缓冲区溢出漏洞的简单原理和利用技巧进行了一定的了解.这里主要记录笔者通过简单的示例程序实现缓冲区溢出漏洞利用的步骤,按由简至繁的顺序,依次描述简单的 ...
- 4-2 R语言函数 apply
#apply函数,沿着数组的某一维度处理数据 #例如将函数用于矩阵的行或列 #与for/while循环的效率相似,但只用一句话可以完成 #apply(参数):apply(数组,维度,函数/函数名) & ...
- Golang - 数据库操作
1. 下载安装包 go get github.com/Go-SQL-Driver/MySQL go install github.com/Go-SQL-Driver/MySQL 2. 连接池 This ...
- Yii设置Cache缓存的方法
先在配置文件components数组中加上: 'cache'=>array( 'class'=>'CFileCache'), 设置Cache: Yii::app()->cache-& ...
- 多启动引导工具——AIO Boot
该软件功能十分强大 官网介绍的也十分详尽 这里仅仅简单标记一下用来以后查找 https://www.aioboot.com/en/ 效果图: 支持多语言: 简单运用: