首页  ·  知识 ·  软件项目
PowerDesigner中为Name列生成注释
网友  http://www.cnblogs.com/zhangpengshou/  综合  编辑:德仔   图片来源:网络
1、打开PowerDesigner,按Shift + Ctrl + X 打开脚本执行窗口 2、在打开的窗口中执行一下代码 &a
1、打开PowerDesigner,按Shift + Ctrl + X 打开脚本执行窗口
2、在打开的窗口中执行一下代码
     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 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
                  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://www.cnblogs.com/zhangpengshou/
CIO之家 www.ciozj.com 微信公众号:imciow
   
免责声明:本站转载此文章旨在分享信息,不代表对其内容的完全认同。文章来源已尽可能注明,若涉及版权问题,请及时与我们联系,我们将积极配合处理。同时,我们无法对文章内容的真实性、准确性及完整性进行完全保证,对于因文章内容而产生的任何后果,本账号不承担法律责任。转载仅出于传播目的,读者应自行对内容进行核实与判断。请谨慎参考文章信息,一切责任由读者自行承担。
延伸阅读