<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    PowerDesigner中name和comment互換

    1 PowerDesigner中批量根據對象的name生成comment的腳本

    執行方法:Open PDM -- Tools -- Execute Commands -- Run Script

    Option Explicit                           
    ValidationMode 
    = True            
    InteractiveMode 
    = im_Batch   
                                                        
    Dim mdl 'the current model    
                                                        
    'get the current active model  
    Set mdl = ActiveModel            
    If (mdl Is NothingThen           
    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                                            

     

    2 PowerDesigner中逆向工程將數據庫中comment腳本賦值到PDM的name

    執行方法:Open PDM -- Tools -- Execute Commands -- Run Script

    Option Explicit                                              
    ValidationMode 
    = True                               
    InteractiveMode 
    = im_Batch                      
                                                                           
    Dim mdl 'the current model                       
                                                                           
    'get the current active model                     
    Set mdl = ActiveModel                               
    If (mdl Is NothingThen                              
    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                                                                                                                     
    if len(tab.comment) <> 0 then                                                                                                           
    tab.name 
    = tab.comment                                                                                               
    end if                                                                                                                              
    On Error Resume Next                                                                                                                
    Dim col 'running column                                                                                                   
    for each col in tab.columns                                                                                              
    if len(col.comment) <>0 then                                                                                                  
    col.name 
    =col.comment                                                                                                       
    end if                                                                                                        
    On Error Resume Next                                                                           
    next                                                                                                                   
    end if                                                          
    next                     
    end sub 


    眼鏡蛇

    posted on 2009-01-10 10:17 眼鏡蛇 閱讀(1646) 評論(1)  編輯  收藏 所屬分類: PowerDesigner

    評論

    # re: PowerDesigner中name和comment互換 2013-03-11 15:24 alex.yao

    very good  回復  更多評論   

    <2025年5月>
    27282930123
    45678910
    11121314151617
    18192021222324
    25262728293031
    1234567

    導航

    統計

    常用鏈接

    留言簿(6)

    隨筆分類

    隨筆檔案

    文章分類

    文章檔案

    搜索

    最新評論

    閱讀排行榜

    評論排行榜

    主站蜘蛛池模板: 人妻仑刮八A级毛片免费看| 亚洲国产综合无码一区| 亚洲娇小性xxxx| 最近免费视频中文字幕大全| 亚洲AV无码国产丝袜在线观看| 在线免费播放一级毛片| 亚洲夜夜欢A∨一区二区三区| 老司机午夜精品视频在线观看免费| 日本一道一区二区免费看 | 国产精品亚洲综合久久| 57PAO成人国产永久免费视频| 亚洲jjzzjjzz在线观看| 一个人在线观看视频免费| 自拍偷区亚洲国内自拍| 国产免费观看黄AV片| 一级毛片免费全部播放| 久久亚洲国产精品一区二区| 四虎影视在线影院在线观看免费视频| 亚洲人成网站在线播放影院在线| 最近中文字幕完整免费视频ww | 久草免费在线观看视频| 亚洲精品天堂在线观看| 国产真人无遮挡作爱免费视频| 成人在线免费视频| 亚洲AV综合色区无码一区| 2020久久精品国产免费| 国产亚洲欧美日韩亚洲中文色| 亚洲五月综合缴情在线观看| 久久99国产乱子伦精品免费| 中文字幕精品三区无码亚洲| 免费人成年激情视频在线观看| 日本免费A级毛一片| 亚洲国产激情在线一区| www.亚洲精品| 日韩av无码久久精品免费| 亚洲日韩国产欧美一区二区三区 | 午夜时刻免费入口| 男女一进一出抽搐免费视频| 亚洲国产午夜精品理论片| 免费成人午夜视频| 亚洲啪啪免费视频|