OptionExplicit
ValidationMode =True
InteractiveMode = im_Batch
Dim mdl 'the current model
'get the current active model
Set mdl = ActiveModel
If (mdl IsNothing) Then
MsgBox"There is no current Model"
ElseIfNot mdl.IsKindOf(PdPDM.cls_Model) Then
MsgBox"The current model is not an Physical Data model."
Else
ProcessFolder mdl
EndIf
'This routine copy name into code for each table, each column and each view
'of the current folder
Privatesub ProcessFolder(folder)
Dim Tab 'running table
foreach Tab in folder.tables
ifnot tab.isShortcut then
iflen(tab.comment) <>0then
tab.name = tab.comment
endif
OnErrorResumeNext
Dim col 'running column
foreach col in tab.columns
iflen(col.comment) <>0then
col.name =col.comment
endif
OnErrorResumeNext
next
endif
next
end sub