PowerDesigner表的name和comment互转
来源:互联网 发布:c语言自学 编辑:程序博客网 时间:2024/05/31 19:28
将Name中的字符COPY至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
将Comment中的字符COPY至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
以上两段代码都是VB脚本,在PowerDesigner中使用方法为:
PowerDesigner->Tools->Execute Commands->Edit/Run Scripts
将代码Copy进去执行就可以了,是对整个CDM或PDM进行操作
- PowerDesigner表的name和comment互转
- PowerDesigner中NAME和COMMENT的互相转换
- PowerDesigner中NAME和COMMENT的互相转换
- PowerDesigner Comment写到name 和name写到Comment
- powerdesigner comment 写到 name 和 name 写到 comment
- PowerDesigner中name和comment互換
- PowerDesigner Name和Comment 互相转化问题
- PowerDesigner中name和comment互換
- PowerDesigner中name和comment互換
- PowerDesigner Comment和name相互转化
- PowerDesigner中name和comment互換
- PowerDesigner中name和comment互換
- PowerDesigner--comment和name互相复制
- PowerDesigner中name和comment互换
- PowerDesigner设计Name和Comment 替换
- PowerDesigner中name和comment互换
- powerdesigner中name和comment转换
- PowerDesigner 的mysql PDM 的COMMENT注释改为name+comment
- Android SDCard Mount 流程分析
- print_r、var_dump、var_export的区别
- Linux上iptables防火墙的基本应用教程
- linux-2.6.26内核中ARM中断实现详解(1)
- ORACLE之 体系结构
- PowerDesigner表的name和comment互转
- 对《贺卫方,何兵:你凭什么反对申纪兰当代表?》一点感想
- ROS链接openni库获取kinect数据(ARM端)
- 命令模式(command)
- linux-2.6.26内核中ARM中断实现详解(2)
- HTTPS中间人攻击源代码(08年代码)
- escape(), encodeURI()和encodeURIComponent()是在Javascript中用于编码字符串的三个常用的方法.
- Android SDCard UnMounted 流程分析
- CString转char * ,string