当前位置:网站首页>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
边栏推荐
- Collect Tiktok video
- pickle. Load error [attributeerror: can't get attribute 'volatile' on < module '\u main']
- 使用 Kibana Timelion 进行时间序列分析
- 音视频、编解码相关电子书、小工具,打包奉送!
- Live HLS protocol
- Uni app wechat applet one click login to obtain permission function
- How to solve the problem of splash screen when the main and sub code streams of easygbs are h.265?
- H264编码profile & level控制
- The key to the success of digital transformation enterprises is to create value with data
- Facebook聊单,SaleSmartly有妙招!
猜你喜欢
pickle. Load error [attributeerror: can't get attribute 'volatile' on < module '\u main']
Regular expression =regex=regular expression
The key to the success of digital transformation enterprises is to create value with data
Crunch简介、安装,使用Crunch制作密码字典
HLS4ML进入方法
How to configure webrtc video streaming format for easygbs, a new version of national standard gb28181 video platform?
Task: denial of service DOS
SQL 入门计划-1-选择
测试自学人必看:软件测试如何找测试项目?
新版国标GB28181视频平台EasyGBS如何配置WebRTC视频流格式播放?
随机推荐
较真儿学源码系列-InheritableThreadLocal(逐行源码带你分析作者思路)
ffmpeg 错误码
mysql 报错 Can‘t create table ‘demo01.tb_Student‘ (errno: 150)*
Oracle物理体系结构
[go ~ 0 to 1] day 5 July 1 type alias, custom type, interface, package and initialization function
703. The k-th element in the data flow
简版拼多多商品数据
Simplified pinduoduo product data
How to solve the problem of splash screen when the main and sub code streams of easygbs are h.265?
Nat penetration of gb28181
brpc理解
Ffmpeg audio related commands
Shell高级进阶
Opencv video quality detection -- sharpness detection
[info() method in org.slf4j.logger]
【let var const】
CMU AI PhD 第一年总结
Live HLS protocol
【无标题】
2022/6/8-2022/6/12