当前位置:网站首页>PowerDesigner displays comment comments
PowerDesigner displays comment comments
2022-07-19 04:36:00 【shibushi114】
PowerDesigner The default displayed column is Name And type , As shown in the figure below :

Now you need to display the comment column , In order to make ER The picture is clearer . however PowerDesigner Check Comment The display has no effect , So deal with it through the following steps :
Double click on the table , The table properties dialog box pops up , Cut to Columns, The default is not displayed Comment Of , Show Comment Column , The operation is as follows :

Sure to save , open a menu Tools>Display Perferences
Check name, adjustment code
after , as follows

open a menu Tools>Execute Commands>Edit/Run Script.. Or use the shortcut key Ctrl+Shift+X, Execute the following code :
Option Explicit
ValidationMode = True
InteractiveMode = im_Batch
Dim blankStr
blankStr = Space(1)
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
Private sub ProcessFolder(folder)
On Error Resume Next
Dim Tab 'running table
for each Tab in folder.tables
if not tab.isShortcut then
tab.name = tab.comment
Dim col ' running column
for each col in tab.columns
if col.comment = "" or replace(col.comment," ", "")="" Then
col.name = blankStr
blankStr = blankStr & Space(1)
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
Next
end sub
after , as follows :

The principle is to display name The value of the column , Replace with the value of the comment , So next time if you adjust comment, And re execute the script , So it's best to put it at the end .
Switch database type

The solution to the problem that the database table script contains double quotation marks
stay PowerDesigner Medium Database -> Edit Currnet DBMS -> Script -> Sql -> Format -> CaseSensitivityUsingQuote Choose from No, that will do :

边栏推荐
猜你喜欢

By voting for the destruction of STI by Dao, seektiger is truly community driven

T + 0 to t + 1! The quick redemption amount is reduced to 10000! Another bank adjusted the rules for the application and redemption of cash wealth management products

成熟的线程要懂得拒绝

C语言基础犄角旮旯的知识之数据类型

ospf综合实验

T+0变T+1!快赎金额降至1万!又有银行调整现金理财产品申赎规则

Eas (energy aware scheduling) green energy-saving scheduler

Install go:tools failed to install in vscode

Sphinx遇到的问题

Delete the file unable to find or create trash directory
随机推荐
异或和加密方式的解密的复现
golang反转reverse切片slice代码示例
Virtual lab basic experiment tutorial -7 Polarization (3)
surging作者出具压测结果
MySQL表的查询进阶
Apache22与opencms9.5集成配置
Codeforces Round #807 (Div 2.) AB
Common errors in golang compilation
OSPF basic optimization
使用小丸工具箱进行极限视频压缩
Swift 【Class】【struct】
Install go:tools failed to install in vscode
[Huang ah code] Introduction to MySQL - 5. Database tips: a single column group by will, and multiple columns?
深度学习中的标量、向量、矩阵和张量的区别
AutoJs学习-2048小游戏自动化
Autojs learning-2048 small game automation
Phthon3 install mysqldb error problem solving reason: image not found
详解Pod和容器资源管理和分配(CPU和内存分配,临时存储管理)
[wechat applet] super easy to understand conditional rendering and list rendering
As a result, all system modifications of the company will be upgraded