PowerDesigner 同步Name到Comment 及 同步 Comment 到Name
来源:互联网 发布:迅雷下载后网络异常 编辑:程序博客网 时间:2024/06/05 19:50
[Database]->[DatabaseGeneration]->[Options] ->GenerateName in Empty Commen
下面的代码将解决这个问题。
将下面代码拷贝到:
PowerDesigner->Tools->Execute Commands->Edit/Run Scripts,点击运行。再看你设计的表,就生成了commands了。
- 代码一:将Name中的字符COPY至Comment中
Option Explicit
ValidationMode = True
InteractiveMode = im_BatchDim 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
nextDim 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_BatchDim 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 IfPrivate 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
nextDim 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
PowerDesigner中使用方法为:
PowerDesigner->Tools->Execute Commands->Edit/Run Scripts
- PowerDesigner 同步Name到Comment 及 同步 Comment 到Name
- PowerDesigner 同步Name到Comment 及 同步 Comment 到Name
- PowerDesigner 同步Name到Comment 及 同步 Comment 到Name
- PowerDesigner Comment写到name 和name写到Comment
- powerdesigner comment 写到 name 和 name 写到 comment
- PowerDesigner 把Comment复制到name中和把name复制到Comment
- PowerDesigner 把Comment写到name中 和把name写到Comment中
- PowerDesigner 把Comment复制到name中和把name复制到Comment .
- PowerDesigner 把Comment复制到name中和把name复制到Comment
- PowerDesigner 把Comment复制到name中和把name复制到Comment
- PowerDesigner 把Comment复制到name中和把name复制到Comment
- powerDesigner 把name项添加到注释(comment)
- PowerDesigner里面将表中name列值复制到comment列
- PowerDesigner 把Comment写到name中 和把name写到Comment中 pd7以后版本可用
- PowerDesigner 把Comment写到name中 和把name写到Comment中 pd7以后版本可用
- PowerDesigner 把Comment写到name中 和把name写到Comment中 pd7以后版本可用
- PowerDesigner 把Comment写到name中 和把name写到Comment中 pd7以后版本可用
- PowerDesigner 把Comment写到name中 和把name写到Comment中 pd7以后版本可用
- Release版本程序----------问题调试
- Freezing of tasks [Kernel Documents]
- HTML 5中SVG 2D笔画与填充
- java Annotation 注解
- Linux诊断命令例解
- PowerDesigner 同步Name到Comment 及 同步 Comment 到Name
- 简单内存泄漏检测方法 解决 Detected memory leaks
- 40个迹象表明你还是php菜鸟
- JDBC连接池、监控组件 Druid
- First
- 用jdbc连接sqlserver数据库,driver和url问题
- 高通AR
- C编程 知识点 小记
- cannot find -lz