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

    隨筆分類

    隨筆檔案

    文章分類

    文章檔案

    搜索

    最新評論

    閱讀排行榜

    評論排行榜

    主站蜘蛛池模板: 老司机精品免费视频| 中国人xxxxx69免费视频| 亚洲AV午夜成人片| 国产免费久久精品99re丫y| 色婷婷亚洲一区二区三区| 亚洲第一AV网站| 最近高清国语中文在线观看免费| 免费人成再在线观看网站| 亚洲国产美国国产综合一区二区| 欧美好看的免费电影在线观看 | 色爽黄1000部免费软件下载| 亚洲av永久无码精品秋霞电影影院| 国产精品成人免费一区二区 | 中文字幕乱码亚洲精品一区| 精品国产亚洲男女在线线电影| 99久久免费中文字幕精品| 亚洲a∨无码精品色午夜| 婷婷亚洲综合五月天小说 | 久久亚洲国产精品成人AV秋霞| 国产亚洲福利一区二区免费看| 99热精品在线免费观看| 色多多免费视频观看区一区| 亚洲国产成+人+综合| 中文字幕亚洲专区| 国产精品视_精品国产免费| 日韩内射激情视频在线播放免费| 美女被爆羞羞网站免费| 精品久久久久久亚洲精品| 国产亚洲精品无码成人| 又粗又硬又黄又爽的免费视频 | 亚洲天堂福利视频| 亚洲国产精品无码专区影院| 免费日本黄色网址| 成人无遮挡裸免费视频在线观看 | 国产高清免费视频| 日韩精品无码免费专区网站| 免费VA在线观看无码| 亚洲日本成本人观看| 亚洲精品无码久久毛片波多野吉衣 | 成全动漫视频在线观看免费高清版下载| 亚洲AV无码男人的天堂|