powerDesigner 把name项添加到注释(comment)
2016-05-17 16:08
561 查看
'
PowerDesigner->Tools->Execute Commands->Edit/Run Scripts
执行如下代码
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
PowerDesigner->Tools->Execute Commands->Edit/Run Scripts
执行如下代码
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
相关文章推荐
- PowerDesigner 面向对象模型(OOM)说明
- htm页面中<a name>加name和id的冲突附解决方法
- 浅谈html中id和name的区别实例代码
- MySQL数据库-错误1166 Incorrect column name
- JavaScript中为元素加上name属性的方法
- js使用for循环及if语句判断多个一样的name
- 关于skip_name_resolve参数的总结分享
- PHP中使用php://input处理相同name值的表单数据
- IE中document.createElement的iframe无法设置属性name的解决方法
- 获取asp.net服务器控件的客户端ID和Name的实现方法
- Python中if __name__ == '__main__'作用解析
- Python中__name__的使用实例
- Python中if __name__ == "__main__"详细解释
- 获取asp.net服务器控件的客户端ID和Name的实现方法
- MySQL数据库-错误1166 Incorrect column name
- 关于skip_name_resolve参数的总结分享
- PowerDesigner中Table视图同时显示Code和Name
- 如何在POWERDESIGNER中将备注产生到数据库中
- PowerDesigner连接MySQL,建立逆向工程图解
- PowerDesigner中,修改column的name和Code同步问题