'------------------------------------------------------------
'
'脚本功能:
' PowerDesigner中批量根据对象的name生成comment的脚本
'执行方法:
' Open PDM--Tools--Execute Commands--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 code for each table, each
'column and each view of the current folde
'------------------------------------------------------------
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
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
'------------------------------------------------------------

最新文章

  1. <textarea>输入框提示文字
  2. 程序员书单_java专项进阶篇
  3. UVa 714 (二分) Copying Books
  4. C# 整形数组排序
  5. HDU 1078 FatMouse and Cheese【记忆化搜索】
  6. apache2.4配置虚拟主机
  7. Bone Collector(01背包+记忆化搜索)
  8. webstorm for mac 破解步骤
  9. python之路day11--装饰器形成的过程、作用、装饰器的固定模式
  10. C++-int类型整数超出范围后的处理
  11. PMP学习经验总结——ITTO第六版教材
  12. 2018.11.01 loj#2319. 「NOIP2017」列队(线段树)
  13. 【Python】远离 Python 最差实践,避免挖坑
  14. STM32 HAL库学习系列第3篇 常使用的几种延时方式
  15. hihocoder155周 任务分配
  16. Oracle 常用系统包
  17. Windows下SVN回滚到旧版本(TortoiseSVN)
  18. ringMVC——redirect重定向跳转传值
  19. 让footer始终位于页面的最底部
  20. (转) Android Service完全解析,关于服务你所需知道的一切(上)

热门文章

  1. mysql-2 数据类型
  2. Synergy使用(安装及配置)
  3. 小米笔记本pro CPU GPU 做科学计算的算力对比
  4. 用 Vue 改造 Bootstrap,渐进提升项目框架
  5. Yii 引入js css jquery 执行操作
  6. 1 数据库开发--MySQL介绍
  7. 【hdu3507】Print Article 【斜率优化dp】
  8. 【bzoj1096】仓库建设 斜率优化dp
  9. 和大于S的最小子数组 · Minimum Size Subarray Sum
  10. marioTcp