常見問題:
出現Could not Initialize JavaVM!
這是由於powerdesiger須要用32位jdk,由於個人是 64 位系統,開發調試須要使用 64位jdk ,不但願直接修改 java_home,不想直接修改環境變量,java
可是能夠在powerdesiger安裝目錄配置腳本startup-classpath.batmysql
Set JAVA_HOME=D:\jdk\jdk832 Set CLASSPATH = D:\mysql-connector-java-5.1.46.jar PdShell16.exe
把腳本拖到 命令行 回車執行腳本sql
進入首選項數據庫
在PowerDesigner中,表結構的code,name字段均爲英文,不易閱讀,若須要將備註中的字段替換到name字段顯示,則執行方法:Tools -- Execute Commands -- Edit/Run Script ,則彈出以下圖中的對話框:spa
執行後能夠將vbscript保存到本地,下次執行時執行本地腳本便可命令行
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.comment) <> 0 then tab.name = tab.comment end if On Error Resume Next Dim col 'running column for each col in tab.columns if len(col.comment) <>0 then col.name =col.comment end if On Error Resume Next next end if next end sub
腳本是經過註釋內容來替換的,須要在數據庫表結構中寫好對應的註釋。3d