PowerDesigner使用技巧

設置單個模型顯示,模型上右鍵單擊Format,html

設置一個模型後右鍵單擊Get Format  ApplyFormat能夠應用到其它選中模型sql

 

在PowerDesigner中 Tools》Generial Options》Fonts 設置字體爲VS默認 Consolas,等寬字體,看起來舒服多了數據庫

設置PDM表中顯示Code 和 Name架構

 

設置後效果:工具

 

 

 

 

 

 

數據庫支持架構導出配置: post

 

自動生成數據庫的說明文檔字體

藉助小工具pdmreader(可從http://www.pdmreader.com/下載)打開PDM文件,而後生成說明文檔。 spa

文件 》打開*.pdm數據庫字典文件》導出doc設計

PDM將Comment寫入Name腳本:3d

 1 Option   Explicit 
 2 ValidationMode   =   True 
 3 InteractiveMode   =   im_Batch
 4 
 5 Dim   mdl   '   the   current   model
 6 
 7 '   get   the   current   active   model 
 8 Set   mdl   =   ActiveModel 
 9 If   (mdl   Is   Nothing)   Then 
10       MsgBox   "There   is   no   current   Model " 
11 ElseIf   Not   mdl.IsKindOf(PdPDM.cls_Model)   Then 
12       MsgBox   "The   current   model   is   not   an   Physical   Data   model. " 
13 Else 
14       ProcessFolder   mdl 
15 End   If
16 
17 Private   sub   ProcessFolder(folder) 
18 On Error Resume Next
19       Dim   Tab   'running     table 
20       for   each   Tab   in   folder.tables 
21             if   not   tab.isShortcut   then 
22                   tab.name   =tab.comment+"("+view.code +")"
23                   Dim   col   '   running   column 
24                   for   each   col   in   tab.columns 
25                   if col.comment="" then
26                   else
27                         col.name= col.comment 
28                   end if
29                   next 
30             end   if 
31       next
32 
33       Dim   view   'running   view 
34       for   each   view   in   folder.Views 
35             if   not   view.isShortcut   then 
36                   view.name   = view.comment+"("+view.code+")"
37             end   if 
38       next
39 
40       '   go   into   the   sub-packages 
41       Dim   f   '   running   folder 
42       For   Each   f   In   folder.Packages 
43             if   not   f.IsShortcut   then 
44                   ProcessFolder   f 
45             end   if 
46       Next 
47 end   sub

執行以上腳本,回用Comment替換Name。

在設計PD時,只須要錄入Code、Comment,Code會對應數據庫字段名,Comment會生成數據庫中字段描述。。

Description用於進行備註說明,便於溝通交流。

 

 

取消自動關聯name和code

PowerDesigner中,但修改了某個字段的name,其code也跟着修改,這個問題很討厭,由於通常來講,name是中文的,code是字段名。 
解決方法以下: 
一、選擇Tools->GeneralOptions...菜單,出現General Options對話框。 
二、從Category中選擇Dialog項。 
三、取消右邊「Name to Code mirroring」複選框。

 

本文爲做者原創,轉載請註明出處。

相關文章
相關標籤/搜索