ASP源码.NET源码PHP源码JSP源码JAVA源码DELPHI源码PB源码VC源码VB源码Android源码
当前位置:首页 >> 数据库 >> 其他数据库 >> PowerDesigner中显示name, code,comment的解决方法 修正脚本,执行不会重复添加comment

PowerDesigner中显示name, code,comment的解决方法 修正脚本,执行不会重复添加comment

来源:网络整理     时间:2016-03-18     关键词:

本篇文章主要介绍了"PowerDesigner中显示name, code,comment的解决方法 修正脚本,执行不会重复添加comment",主要涉及到方面的内容,对于其他数据库感兴趣的同学可以参考一下: Option Explicit ValidationMode = TrueInteractiveMode = im_Batch Dim...

  1. Option   Explicit   
  2. ValidationMode   =   True
  3. InteractiveMode   =   im_Batch  
  4. Dim   mdl   '   the   current   model
  5. '   get   the   current   active   model 
  6. Set   mdl   =   ActiveModel   
  7. If   (mdl   IsNothing)   Then
  8.       MsgBox   "There   is   no   current   Model "
  9. ElseIfNot   mdl.IsKindOf(PdPDM.cls_Model)   Then
  10.       MsgBox   "The   current   model   is   not   an   Physical   Data   model. "
  11. Else
  12.       ProcessFolder   mdl   
  13. EndIf
  14. Private   sub   ProcessFolder(folder)   
  15. OnErrorResumeNext
  16. Dim   Tab   'running     table 
  17.       for   each   Tab   in   folder.tables   
  18.             if   not   tab.isShortcut   then   
  19.                   tab.name   =   tab.comment  
  20. Dim   col   '   running   column 
  21.                   for   each   col   in   tab.columns   
  22.                   if col.comment<>"" and instr( col.name,"*")=0  then  
  23.                         col.name= col.name & " * " &  col.comment   
  24.                   end if  
  25.                   next   
  26.             end   if   
  27.       next  
  28. Dim   view   'running   view 
  29.       for   each   view   in   folder.Views   
  30.             if   not   view.isShortcut   then   
  31.                if view.comment<>"" and instr( view.name,"*")=0  then  
  32.                   view.name   = view.name & " * " &  view.comment   
  33.                end if  
  34.             end   if   
  35.       next  
  36. '   go   into   the   sub-packages 
  37. Dim   f   '   running   folder 
  38. ForEach   f   In   folder.Packages   
  39.             if   not   f.IsShortcut   then   
  40.                   ProcessFolder   f   
  41.             end   if   
  42. Next
  43. end   sub  

在PD上按下:Ctr+shift + X 后,把以上VBS脚本,复制到上面运行。经改良后不会,执行多次不会重复添加描述。

转:http://blog.csdn.net/jockey/article/details/44682855

以上就介绍了PowerDesigner中显示name, code,comment的解决方法 修正脚本,执行不会重复添加comment,包括了方面的内容,希望对其他数据库有兴趣的朋友有所帮助。

本文网址链接:http://www.codes51.com/article/detail_460888.html

相关图片

相关文章