当前位置:网站首页>PowerDesigner设计Name和Comment 替换
PowerDesigner设计Name和Comment 替换
2022-07-01 18:46:00 【小捣蛋1124】
comment 是注释。name 是字段描述
在 PowerDesigner中操作如下
PowerDesigner-->Tools-->Execute Commands-->Edit/Run Scripts 下执行就OK了。
把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
将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
边栏推荐
- Crunch简介、安装,使用Crunch制作密码字典
- IPv4 address, subnet mask, gateway
- AAAI2020: Real-time Scene Text Detection with Differentiable Binarization
- 求各种极限的方法
- 703. The k-th element in the data flow
- Live HLS protocol
- Remove line breaks from MySQL query results
- ffmpeg 音频相关命令
- Introduction to relevant processes and functions of wechat official account development
- Shell advanced
猜你喜欢

数字化转型企业成功的关键,用数据创造价值

What is the essential difference between Bi development and report development?

ddr4测试-2

Axure does not display catalogs

Regular expression =regex=regular expression

Methods of finding various limits

Wireshark packet analysis TCP, FTP
![pickle. Load error [attributeerror: can't get attribute 'volatile' on < module '\u main']](/img/98/c4df0747856eda262b82942eedad8f.png)
pickle. Load error [attributeerror: can't get attribute 'volatile' on < module '\u main']

Introduction to relevant processes and functions of wechat official account development

大厂音视频职位面试题目--今日头条
随机推荐
OpenCV视频质量检测--清晰度检测
大厂音视频职位面试题目--今日头条
DDR4 test-2
JVM内存模型
Regular expression =regex=regular expression
mysql 報錯 Can‘t create table ‘demo01.tb_Student‘ (errno: 150)*
uni-app商品分类
Interview question 16.16 Partial sorting - Double finger needling
Redo和Undo的区别
ffmpeg 错误码
CMU AI PhD 第一年总结
Compile ffmpeg source code with msys+vs2019 under win10
Learning records of building thingsboard, an Internet of things platform
安装sharp报错
Mysql查询结果去除换行
118. 杨辉三角
Nat penetration of gb28181
tensorflow报错Could not load dynamic library ‘libcudnn.so.8
SIP protocol of gb28181
GB28181的NAT穿透