当前位置:网站首页>PowerDesigner显示Comment注释
PowerDesigner显示Comment注释
2022-07-17 04:09:00 【shibushi114】
PowerDesigner默认显示的列是Name及类型,如下图示:

现在需要显示注释列,以便使得ER图更加清晰。但是PowerDesigner勾选Comment显示没有效果,所以通过以下几步来处理:
双击表,弹出表属性对话框,切到Columns,默认是没显示Comment的,显示Comment列,操作如下:

确定保存,打开菜单 Tools>Display Perferences
勾选name,调整code
确定后,如下

打开菜单Tools>Execute Commands>Edit/Run Script.. 或者用快捷键 Ctrl+Shift+X,执行下面的代码:
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
确定后,如下:

原理就是把显示name的列的值,替换成注释的值,所以下次如果调整comment,还要重新执行脚本,所以最好放在最后执行。
切换database类型

数据库表脚本包含双引号问题的解决方法
在 PowerDesigner 中的 Database -> Edit Currnet DBMS -> Script -> Sql -> Format -> CaseSensitivityUsingQuote 中选择 No,即可:

边栏推荐
- LeetCode之最大正方形(暴力求解和动态规划求解)
- Vs Code common shortcut keys
- Unity shader - "fast SSS: fast subsurface scattering"
- About the problem of database, the concept of uniqueness and non repetition
- 06 MAUI,WPF使用 MVVM Toolkit 框架 构建 MVVM 程序
- minimum spanning tree
- 小程序毕设作品之微信电子书阅读小程序毕业设计(3)后台功能
- Academic sharing | design and development of multi staining pathological image information evaluation system based on openvino
- Xcode11 add a boot page (the launch images source option is missing after the upgrade)
- Intel + Lenovo jointly launched open source cloud solutions
猜你喜欢
![[seventh issue of notebook series] download and use of openvino pre training model](/img/74/d5958137ddabadef1724afda5656e1.png)
[seventh issue of notebook series] download and use of openvino pre training model

李宏毅_机器学习_作业4(详解)_HW4 Classify the speakers

How to open the applet for people near wechat (the way to open the applet near wechat)

Impersonate the server for requests

机器学习11:代价敏感学习

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

Wechat e-book reading applet graduation design of applet completion works (3) background function

51单片机一究到底输入模式

Wechat e-book reading applet graduation design of applet completion works (1) development outline

Touchid and faceid~1
随机推荐
Wechat online education video on demand learning applet graduation project (4) opening report
项目套价是什么意思?
Simulation Implementation of library function
minimum spanning tree
[database] knowledge and skills at the end of the term ----- Chapter 9 database design
Machine learning 11: cost sensitive learning
donet framework4. X==windows form application new project, through system Data. SqlClient connects to sqlserver to query
Technical writing guide for programmers to leave work early
About the problem of database, the concept of uniqueness and non repetition
C # use this keyword to concatenate constructor to call method
64. Minimum path sum: given an M x n grid containing non negative integers, please find a path from the upper left corner to the lower right corner, so that the sum of the numbers on the path is the m
基于STM32的SG90舵机实验含代码(HAL库)
Structure gets the address of the main structure (struct) through member variables
CAD video course recommendation station B
论文研究NLP
[database] must know at the end of the term ----- Chapter 2 relational data model
Sg90 actuator experiment based on STM32, including code (HAL Library)
Touchid and faceid~2
Brief introduction to cmtime
T+0变T+1!快赎金额降至1万!又有银行调整现金理财产品申赎规则