Option ExplicitValidationMode = TrueInteractiveMode = im_BatchDim mdl ' the current model' get the current active modelSet mdl = ActiveModelIf (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 mdlEnd IfPrivate Sub ProcessFolder(folder) On Error Resume Next Dim Tab ' running able For Each Tab In folder.tables If Not tab.isShortcut Then tab.name = tab.code + " " + tab.comment Dim col ' running column For Each col In tab.columns If col.Comment = "" Or Replace(col.Comment, " ", "") = "" Then col.Name = col.Code Else col.Name = col.Comment End If Next End If Next Dim view ' running view For Each view In folder.Views If Not view.IsShortcut Then view.Name = view.Comment End If Next ' go into the sub-packages Dim f ' running folder For Each f In folder.Packages If Not f.IsShortcut Then ProcessFolder f End If NextEnd Sub
PowerDesigner 显示 Comment 注释
🏷️ PowerDesigner
原文在 这里,下面是简略版的说明,详情看原文。
双击任意表,在 Columns 标签中增加 Comment 列
Tools > Display Perferences(显示首选项) > General Settings > Table > Advanced > Form > Columns > List columns > Select
按顺序选择一下属性
Tools > Execute Commands > Edit/Run Scripts (Ctrl + Shift + X),执行下面的 VBS 脚本。
稍微修改了点:始终显示表的英文名;备注为空时显示列名。
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61