解决方案:在菜单栏依次点击 Tools -> Execute Commands -> Run Script 。点击完毕会弹出图2对应的弹出框,然后在输入框中输入以下脚本,并执行粘贴的脚本。然后再去双击表模型,进入preview界面,会发现生成了以name作为注释sql脚本。
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