powerdesigner自动将name填充到注释的脚本
我在建模的时候,希望在生成脚本的时候有注释,所以才会看到Comment列,实际上,只要你的表中的Name列不为空,运行下面的VBScript,PD会帮你自动填充注释的Comment列值。
'把pd中那么name想自动添加到comment里面
'如果comment为空,则填入name;如果不为空,则保留不变,这样可以避免已有的注释丢失. 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 if trim(tab.comment)="" then '如果有表的注释,则不改变它.如果没有表注释.则把name添加到注释里面. tab.comment = tab.name end if Dim col ' running column for each col in tab.columns if trim(col.comment)="" then '如果col的comment为空,则填入name,如果已有注释,则不添加;这样可以避免已有注释丢失. col.comment= col.name end if next end if next Dim view 'running view for each view in folder.Views if not view.isShortcut and trim(view.comment)="" 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
打开运行脚本的界面(Crtl+Shift+X),输入脚本,运行后注释的值就会自动的帮你填充好。
到此,PD添加共用字段和自动添加注释的方法结束了。
powerdesigner自动将name填充到注释的脚本的更多相关文章
- Eclipse自动生成作者、日期注释等功能设置
我们在使用Eclipse 编写Java代码时,自动生成的注释信息都是按照预先设置好的格式生成的. 修改作者.日期注释格式:打开Windows->Preferences->Java-> ...
- Eclipse自动补全功能和自动生成作者、日期注释等功能设置
修改作者.日期注释格式:打开Windows->Preferences->Java->Code Style->Code Templates,点击右边窗口中的Comments,可以 ...
- Eclipse自动生成作者、日期注释等功能设置(转载)
在使用Eclipse 编写Java代码时,自动生成的注释信息都是按照预先设置好的格式生成的. 修改作者.日期注释格式:打开Windows->Preferences->Java->Co ...
- PowerDesigner 的mysql PDM 的COMMENT注释
PowerDesigner 的mysql PDM 的COMMENT注释 2012-11-01 15:38 4447人阅读 评论(0) 举报 分类: 数据库相关(7) PowerDesigner 的my ...
- 缓冲流自动把getchar()填充
#include"stdio.h" #include"conio.h" #include<stdlib.h> int main() { char c ...
- Eclipse自动生成作者、日期注释等功能设置 (转载)
原文地址:http://blog.sina.com.cn/s/blog_4080505a0101guoh.html 在使用Eclipse 编写Java代码时,自动生成的注释信息都是按照预先设置好的格式 ...
- python注释、脚本参数、字节码
python注释.脚本参数.字节码 --道心 python安装 1.下载安装包 https://www.python.org/downloads/ 2.安装 默认安装路径:C:\python27 3. ...
- PowerDesigner 根据NAME属性自动生成表和列注释(不用写脚本)
PowerDesigner 11 menu: [Database]->[Database Generation] tab: [Tables & Views]->check tabl ...
- 打开powerDesigner时,创建table对应的自动生成sql语句没有注释
在创建pdm时由于需要在name列填写的是以后要在表中创建的注释信息,comment中则写的说明信息字数比较多.默认情况下在生成建表sql时不能将name生成注释信息,进行如下设置可以讲name生成注 ...
随机推荐
- 《Advanced Bash-scripting Guide》学习(十七):用more来查看gzip文件
本文所选的例子来自于<Advanced Bash-scripting Gudie>一书,译者 杨春敏 黄毅 #!/bin/bash #使用more查看gzip文件 NOARGS= NOTF ...
- CMMI 3级精简并行过程综述
“精简并行过程”(Simplified Parallel Process,SPP)是基于CMMI以及软件工程和项目管理知识而创作的一种“软件过程改进方法和规范”,它由众多的过程规范和文档模板组成.SP ...
- Gitblit的使用
什么是 Gitblit Gitblit是一个开源的用于管理,查看和提供Git仓库. 它主要设计为希望托管集中存储库的小工作组的工具. Gitblit有什么特点 ... Gitblit部署示例1 日常维 ...
- GCD多线程的使用
转载自http://blog.csdn.net/nono_love_lilith/article/details/7829557 写得非常好 1.下面来看下如何使用gcd编程的异步 dispatch_ ...
- OpenCV - win7+vs2013(2012)+opencv3.0.0 环境配置 (以及配置技巧)
1. opencv 3.0.0 库下载地址, 这里的版本是3.0.0,其他的版本配置可能不一样,请大家注意. http://sourceforge.net/projects/opencvlibrary ...
- IEflash遇到flash遮挡
遇到IE中(包括IE6+)弹窗广告要flash遮挡的问题,后来想到了常用的iframe方法(参见<解决IE6 select z-index无效,遮挡div的bug>),最终成功了flash ...
- LeetCode Maximum Average Subarray I
原题链接在这里:https://leetcode.com/problems/maximum-average-subarray-i/description/ 题目: Given an array con ...
- angularJs 指令的封装
首先 指令的应用场景: 1:使你的html更具语义化,不需要深入研究代码就可以知道页面的大概逻辑. 2:抽象出一个自定义组件,在其他的地方进行重用. 一:directive的定义及其使用方法: 下面是 ...
- bzoj 4712 洪水——动态DP
题目:https://www.lydsy.com/JudgeOnline/problem.php?id=4712 因为作为动态DP练习而找到,所以就用动态DP做了,也没管那种二分的方法. 感觉理解似乎 ...
- C# 加密和解密文件
相关示例代码如下: using System; using System.IO; using System.Security; using System.Security.Cryptography; ...