PD name 和 comment 互换
1 PowerDesigner中批量根据对象的name生成comment的脚本
执行方法: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
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
-----------------------------------------------------------------------
2 PowerDesigner中逆向工程将数据库中comment脚本赋值到PDM的name
执行方法: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 len(tab.comment) <> 0 then
tab.name = tab.comment
end if
On Error Resume Next
Dim col 'running column
for each col in tab.columns
if len(col.comment) <>0 then
col.name =col.comment
end if
On Error Resume Next
next
end if
next
end sub
摘自:http://antzantz.blog.sohu.com/106822073.html
PD name 和 comment 互换的更多相关文章
- pd name与comment互换,或者code互换,总之互换
1 PowerDesigner中批量根据对象的name生成comment的脚本 执行方法:Open PDM -- Tools -- Execute Commands -- Run Script Opt ...
- PowerDesigner 逆向中 Name和Comment互换
在使用PowerDesigner对数据库进行概念模型和物理模型设计时,一般在NAME或Comment中写中文,在Code中写英文.Name用来显 示,Code在代码中使用,但Comment中的文字会保 ...
- 美团店铺评价语言处理以及分类(tfidf,SVM,决策树,随机森林,Knn,ensemble)
第一篇 数据清洗与分析部分 第二篇 可视化部分, 第三篇 朴素贝叶斯文本分类 支持向量机分类 支持向量机 网格搜索 临近法 决策树 随机森林 bagging方法 import pandas as pd ...
- 基于pandas python sklearn 的美团某商家的评论分类(文本分类)
美团店铺评价语言处理以及分类(NLP) 第一篇 数据分析部分 第二篇 可视化部分, 本文是该系列第三篇,文本分类 主要用到的包有jieba,sklearn,pandas,本篇博文主要先用的是词袋模型( ...
- PowerDesigner软件的使用
1. 报错:Could not Initialize JavaVM 的解决方案: powerDesigner不支持x64JDK,ok.安装32位. 仅仅是安装一下,不要做任何配置.......关闭po ...
- PD中将Comment 从Name复制值
PD中将Comment 从Name复制值, 将以下语句考到,pd 工具栏下的执行脚本中执行下就OK了 Option Explicit ValidationMode = True Interactive ...
- powerdesign中逆向工程后name和comment的互换
powerdesign 中,将数据库中可以逆向生成pdm的结构图,比较清晰看到系统的结构, 但假如是db先行的话,一般是db中的每个列中用comment中文注释说明这列是 干什么的,但逆向工程后,会发 ...
- PowerDesigner中NAME和COMMENT的互相转换,需要执行语句
原文: http://www.cnblogs.com/xnxylf/p/3288718.html 由于PDM 的表中 Name 会默认=Code 所以很不方便, 所以需要将 StereoType 显示 ...
- PowerDesigner中NAME和COMMENT的互相转换
原文: http://www.cnblogs.com/yelaiju/archive/2013/04/26/3044828.html 由于PDM 的表中 Name 会默认=Code 所以很不方便, 所 ...
随机推荐
- Mac环境下svn的使用(转载)
在Windows环境中,我们一般使用TortoiseSVN来搭建svn环境.在Mac环境下,由于Mac自带了svn的服务器端和客户端功能,所以我们可以在不装任何第三方软件的前提下使用svn功能,不过还 ...
- Nginx - Core Module Directives
The following is the list of directives made available by the Core module. Most of these directives ...
- SQL_CURSOR_游标循环
) DECLARE My_Cursor CURSOR --定义游标 FOR (SELECT column1 FROM #temp1) --查出需要的集合放到游标中 OPEN My_Cursor; -- ...
- 腾讯QQ群数据下载方法(7000万个qq群资料全泄漏)
仔细读完一定能找到自己需要的东西 据新华网报道,国内知名安全漏洞监测平台乌云20日公布报告称,腾讯QQ群关系数据被泄露,网上可以轻易就能找到数据下载链接,根据这些数据,通过QQ号可以查询到备注姓名.年 ...
- JDBC(用Eclipse操作数据库Oracle)的基础操作集合
JDBC: JDBC(Java Data Base Connectivity,java数据库连接)是一种用于执行SQL语句的Java API,可以为多种关系数据库提供统一访问,它由一组用Java语言编 ...
- swift闭包传值
不知道原理,就知道这么用的,皮毛上的那一点. 寻思着把以前的项目改成swift的,结果了,,, 反向传值 一. //类似于OC中的typedef typealias sendValueClosure= ...
- KVC/KVO总结
KVC(键值编码) 动态设置: setValue:属性值 forKey:属性名(用于简单路径) setValue:属性值 forKeyPath:属(用于复合路径,例如Person有一个Account类 ...
- XCode中的特殊快捷键图标
⌘——Command () ⌃ ——Control ⌥——Option (alt) ⇧——Shift ⇪——Caps Lock fn——功能键就是fn
- OC 成员变量作用域
1. 成员变量作用域: @public :在任何地方都能直接访问对象的成员变量. @private :只能在当前类的对象方法中直接访问.(@implementation中默认是@priv ...
- css3学习笔记之背景
background-size background-size指定背景图像的大小 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 &l ...