当前位置:网站首页>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
边栏推荐
- brpc理解
- 求各种极限的方法
- ES6中的代理proxy
- 一文读懂C语言中的结构体
- 博途V16 获取系统时间转换成字符串
- AAAI2020: Real-time Scene Text Detection with Differentiable Binarization
- Uni app product classification
- 大厂音视频职位面试题目--今日头条
- Optaplanner learning notes (I) case cloud balance
- The key to the success of digital transformation enterprises is to create value with data
猜你喜欢

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

Axure does not display catalogs

The key to the success of digital transformation enterprises is to create value with data

JS 之 常用内置类的使用

Test self-study people must see: how to find test items in software testing?

Regular expression =regex=regular expression

AAAI2020: Real-time Scene Text Detection with Differentiable Binarization

SIP protocol of gb28181

HLS4ML报错The board_part definition was not found for tul.com.tw:pynq-z2:part0:1.0.

axure不显示元件库
随机推荐
OpenCV视频质量检测--清晰度检测
博途V16 获取系统时间转换成字符串
uni-app商品分类
[go ~ 0 to 1] day 5 July 1 type alias, custom type, interface, package and initialization function
[Mori city] random talk on GIS data (I)
What must be done in graduation season before going to Shanhai
DTD modeling
Live HLS protocol
Use the uni app demo provided by Huanxin to quickly realize one-on-one chat
CMU AI PhD first year summary
Crunch简介、安装,使用Crunch制作密码字典
wireshark报文分析tcp,ftp
mysql 报错 Can‘t create table ‘demo01.tb_Student‘ (errno: 150)*
HLS4ML/vivado HLS 报错解决方案
Uni app wechat applet one click login to obtain permission function
【无标题】
Collation of open source protocols of open source frameworks commonly used in Web Development
Introduction and installation of crunch, and making password dictionary with crunch
2022/5/23-2022/5/30
How to correctly use vertx to operate redis (3.9.4 with source code analysis)