问题:PowerDesigner如何将物理模型转为对象模型,将对象模型转生成Java类
解决:物理模型转对象模型
注:勾选一下选项
解决:将对象模型转为Java类
核对后点击“确定”即可生成.Java文件,在对应的位置查看即可
如何将模型中的code列和name列的内容调换
解决:通过执行以下脚本可解决
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 code 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
if len(tab.code) <> 0 then
tab.name = tab.code
end if
On Error Resume Next
Dim col 'running column
dim w
for each col in tab.columns
if len(col.code) <>0 then
w=col.name
col.name =col.code
col.code=w
end if
On Error Resume Next
next
end if
next
end sub
即可实现调换