`

powerdesign导出name作为comment

阅读更多
首先打开PDM,tools->execute commands->edit/run script
运行以下脚本,将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   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
end   sub 

然后在database->generate database->options->table&column中分别选中table和column的coment,导出表的时候,即可导出comment
分享到:
评论
发表评论

文章已被作者锁定,不允许评论。

相关推荐

Global site tag (gtag.js) - Google Analytics