美文网首页
2018-09-22

2018-09-22

作者: 嘿嘿_信我者得永生 | 来源:发表于2018-09-22 22:43 被阅读0次

pd执行脚本方法
菜单 Tools > Execute Commands > Edit/Run Scripts

将Name中的字符复制至Comment中,只有Comment字段为空才复制

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 tab.comment="" then
                  tab.comment   =   tab.name 
                end if
                  Dim   col   '   running   column 
                  for   each   col   in   tab.columns 
                    if col.comment="" then
                        col.comment=   col.name 
                    end if
                  next 
            end   if 
      next

      Dim   view   'running   view 
      for   each   view   in   folder.Views 
            if   not   view.isShortcut   then 
                if view.comment="" then
                  view.comment   =   view.name
                end if
            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

相关文章

  • 2018-09-23

    2018-09-22 戚洋洋 2018-09-22 23:04 · 字数 451 · 阅读 3 · 日记本 敬爱的...

  • 【Google Arts & Culture】2018-09-2

    2018-09-22 Saturday source 2018-09-17 Monday source 2018-...

  • Day2(2018-09-22)

    煎蛋英语-七天口语特训-Day2(2018-09-22)Rejecting an Invitation 委婉地拒绝...

  • JS类型转换和内存机制

    title: JS类型转换和内存机制date: 2018-09-22 22:34:39tags: [JavaScr...

  • 胖宝宝的忧思录

    (9) 胖宝宝的忧思录 晨小贝 已关注 2018-09-22 18:57 · 字数 1910 · 阅读 5 · 日...

  • 第三周检视

    Eva肖肖 2018-09-22 06:31 · 字数 443 · 阅读 25 · 日记本 周检视 在213这个大...

  • 七绝·游子思乡

    忽忆家中明月夜, 孤芳凋落北风凉。 遥思故土双亲暖, 身处高台难望乡。 (2018-09-22)

  • 手机组 | 佛系出走

    2018-09-17 → 2018-09-22 湖南郴州小东江 → 重庆 南山 高椅岭 仰天湖大草原 佛系 ...

  • 2018-09-26

    脾气古怪的爸爸 庞芸熙(修改稿1) 庞芸熙 2018-09-22 18:48 · 字数 381 · 阅读 17 ·...

  • 2018-09-26

    戚洋洋 2018-09-22 23:04 · 字数 451 · 阅读 3 · 日记本 敬爱的刘总,亲爱的家人们,大...

网友评论

      本文标题:2018-09-22

      本文链接:https://www.haomeiwen.com/subject/rgtfoftx.html