powerDesigner 导入导出字段增加注释

news/2024/7/4 7:48:50

打开脚本执行器
打开powerDesigner 按Ctrl+Shift+X 打开脚本编辑器,也可以去菜单中找(Tools --> Excute commands --> Edit/Run Script).

运行脚本即可

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 comment 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
'将表名称作为表注释
tab.comment = tab.name
Dim col ' running column
for each col in tab.columns
'把列名称和comment合并为comment
col.comment= col.name
next
end if
next
  
Dim view 'running view
for each view in folder.Views
if not view.isShortcut then
view.comment = view.name
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

http://lihuaxi.xjx100.cn/news/1555933.html

相关文章

【MATLAB】安装 shared_slreportgen_reportexplorer_common 时检测到以下错误

解决方法 下载matlab的时候以及安装的时候关闭杀毒软件。 然后也可以把simulink和DSP以及signal processing 相关的toolbox全部不勾选(推荐) 这两个工具箱没有其实没啥大的影响,就是信号处理这块的增强功能没有了 (来自&#xff…

用Python整理下载文件夹

文章目录 文件类型字典移动文件主流程 文件类型字典 根据熵增原理,我们的文件夹在经过一段时间之后会变得混乱不堪,尤其是桌面和下载文件夹,找个东西会十分费劲,特别影响效率,所以用Python做一个文件夹整理小工具还是…

ClickHouse进阶(十八):clickhouse管理与运维-用户配置

进入正文前,感谢宝子们订阅专题、点赞、评论、收藏!关注IT贫道,获取高质量博客内容! 🏡个人主页:含各种IT体系技术,IT贫道_大数据OLAP体系技术栈,Apache Doris,Kerberos安全认证-CSDN博客 📌订阅…

idea 使用 groovyScript 获取方法参数列表生成方法注释模板遇到的问题。

1、网上好多使用groovyScript来设置获取方法列表生成注释模板的代码,我这篇文章的是想讨论下这种方式存在的一个问题,希望有大佬能提供一个解决方案。 2、设置步骤什么的就省略了直接描述问题。 3、groovyScript代码段如下: groovyScript(…

在windows上执行ssh-keygen报错Bad permissions

在windows上执行ssh-keygen报错Bad permissions:如下 C:\Users\xiaoming>ssh-keygen -p -m PEM -f C:\mywork\id_rsa Bad permissions. Try removing permissions for user: BUILTIN\\Users (S-1-6-92-143) on file C:/mywork/id_rsa.WARNING: UNPROTECTED PRIV…

vue模板语法上集->插值,指令,过滤器,计算属性监听属性,vue购物车

插值指令过滤器计算属性&监听属性vue购物车 1.插值 <!DOCTYPE html> <html><head><meta charset"utf-8"><script src"https://cdn.bootcdn.net/ajax/libs/jquery/3.7.1/jquery.js"></script><script src&quo…

掷骰子的多线程应用程序2基于互斥量的线程同步(复现《Qt C++6.0》)

说明&#xff1a;在复现过程中出现两点问题&#xff08;1&#xff09;run()函数中对m_diceValued的赋值&#xff08;2&#xff09;do_timeOut()函数中没有对m_seq、m_diceValued进行定义。修改后的复现程序如下所示&#xff1a; 主线程&#xff1a; .h #pragma once#include…

电脑提示找不到msvcr120.dll无法继续执行代码,哪个修复方法更简单

电脑报错“找不到msvcr120.dll无法继续执行代码”。我相信&#xff0c;对于许多使用电脑的朋友来说&#xff0c;这个问题并不陌生。我们在使用电脑的过程中&#xff0c;可能会遇到各种各样的问题&#xff0c;其中就包括了找不到msvcr120.dll这个文件的问题。那么&#xff0c;这…