当前位置:网站首页>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
边栏推荐
- A brief understanding of white box encryption technology
- 【let var const】
- Salesmartly has some tricks for Facebook chat!
- [untitled]
- DDR4 test-2
- 2022/5/23-2022/5/30
- Audio and video, encoding and decoding related e-books, gadgets, packaged for free!
- Opencv video quality detection -- sharpness detection
- GetMessage底层机制分析
- Use the uni app demo provided by Huanxin to quickly realize one-on-one chat
猜你喜欢

Instagram 为何从内容共享平台变成营销工具?独立站卖家如何利用该工具?

SIP protocol of gb28181

Oracle物理体系结构

Salesmartly has some tricks for Facebook chat!
![Thesis reading [distinctive late semantic graph for video capturing]](/img/d4/4f84a73a9127fa87bb0a74c4655d15.png)
Thesis reading [distinctive late semantic graph for video capturing]

自定义插入页面标签以及实现类似通讯录的首字母搜索

AAAI2020: Real-time Scene Text Detection with Differentiable Binarization

Actual combat of flutter - fast implementation of audio and video call application

研究了11种实时聊天软件,我发现都具备这些功能…

通过js实现金字塔(星号金字塔,回文对称数字金字塔)
随机推荐
Transaction isolation level gap lock deadlock
HLS4ML/vivado HLS 报错解决方案
OpenCV视频质量检测--清晰度检测
CMU AI PhD first year summary
Remove line breaks from MySQL query results
ES6中的代理proxy
对象的创建
宝,运维100+服务器很头疼怎么办?用行云管家!
wireshark报文分析tcp,ftp
uni-app商品分类
[SQL optimization] the difference between with as and temporary tables
Shell高级进阶
Go Language Advanced
[go ~ 0 to 1] day 5 July 1 type alias, custom type, interface, package and initialization function
【无标题】
Actual combat of flutter - fast implementation of audio and video call application
Regular expression =regex=regular expression
一文读懂C语言中的结构体
Ffmpeg error code
DDR4 test-2