Oracel反向生成PDM后没有字段说明
从name替换comment
-
123456789101112131415161718192021222324252627282930313233343536373839404142434445
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替换name
-
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
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
-
分类:
Oracel
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 10年+ .NET Coder 心语 ── 封装的思维:从隐藏、稳定开始理解其本质意义
· 提示词工程——AI应用必不可少的技术
· 地球OL攻略 —— 某应届生求职总结
· 字符编码:从基础到乱码解决
· SpringCloud带你走进微服务的世界