zoukankan      html  css  js  c++  java
  • 如何将Powerdesign物理模型中的name复制成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 
                      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
    CP_NAME_TO_COMMENT

    将上面的代码保存为vbscript保存至  C:Program Files (x86)SybasePowerDesigner 15VB Scripts 中,命名 cp_name_comment.vbs

    然后在PD菜单  Tool -> Execute Commands->   Edit/Run Script  选择上面所保存的vb script

  • 相关阅读:
    页面打印
    scala
    IntelliJ Idea 常用快捷键列表
    flume
    spring事务管理方式,aop
    oldboy es和logstash
    elasticsearch视频34季
    elasticsearch视频
    python3
    git
  • 原文地址:https://www.cnblogs.com/HondaHsu/p/7054115.html
Copyright © 2011-2022 走看看