<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)

    隨筆分類

    隨筆檔案

    文章分類

    文章檔案

    搜索

    最新評論

    閱讀排行榜

    評論排行榜

    主站蜘蛛池模板: 嘿嘿嘿视频免费网站在线观看| 国产成人精品日本亚洲专区| 国产好大好硬好爽免费不卡 | 亚洲国产精品自在拍在线播放| EEUSS影院WWW在线观看免费| 中文字幕亚洲综合精品一区| 精品免费国产一区二区| 成人片黄网站色大片免费观看cn| 亚洲视频一区在线播放| 国产男女猛烈无遮档免费视频网站| www成人免费视频| 亚洲国产美女精品久久| 亚洲乱码中文字幕综合234| 18女人毛片水真多免费| 粉色视频在线观看www免费| 成人超污免费网站在线看| 久久久久久久国产免费看 | 精品人妻系列无码人妻免费视频 | 18禁免费无码无遮挡不卡网站| 日韩色日韩视频亚洲网站| 久久久国产精品亚洲一区| 亚洲av午夜精品一区二区三区| 免费能直接在线观看黄的视频| 亚洲精品一卡2卡3卡三卡四卡| 国产免费黄色大片| 精品香蕉在线观看免费| h在线看免费视频网站男男| 2020国产精品亚洲综合网| 亚洲AV综合色一区二区三区| 免费国产高清视频| 日韩精品福利片午夜免费观着| 成人毛片100免费观看| 亚洲国产精品久久久久秋霞小| 黄网址在线永久免费观看| 亚洲黄色免费观看| a级毛片免费高清毛片视频| 久久精品国产亚洲AV大全| 亚洲精品V欧洲精品V日韩精品| 久久久久久成人毛片免费看 | 中文字幕亚洲免费无线观看日本 | 久久久国产精品无码免费专区|